OSD join domain step overwrites existing computer objects without warning

K C 1 Reputation point
2021-04-05T14:53:56.717+00:00

We're going through a huge hardware refresh, and it's come to our attention that the join domain step in the OSD task sequence will join new systems to the domain with a name that matches and old system breaking the domain trust of the old system. While the old system should have its name changed prior, or the new system prepped with a new/unique name, is there anything we can do to prevent this from happening (such as a prompt that the name already exists)? Can anyone explain why the new computer account is created when one with the same name already exists?

Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
1,071 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Jason Sandys 31,406 Reputation points Microsoft Employee Moderator
    2021-04-06T04:37:24.07+00:00

    How are the new devices named and why are they being named with the same name as existing systems?

    Also, which task exactly are you using? An actual Join Domain task or the Apply Network Settings task?

    1 person found this answer helpful.
    0 comments No comments

  2. HanyunZhu-MSFT 1,846 Reputation points Microsoft External Staff
    2021-04-06T08:06:34.783+00:00

    @K C

    Thanks for posting in Microsoft Q&A forum.

    To prevent the occurrence of joining domains with an existing name during OSD, it is suggested to query AD and determine wether the name exists in AD.
    Please refer to the following steps:

    1. Enable PowerShell in boot image
    2. Create a package that copy’s AD module files to the boot image, and run it in task sequence
    3. Create a PowerShell script to:
      ·Interact with task sequence.
      ·load PowerShell form for prompting computer name selection.
      ·Import Active Directory module, securely connect to Active Directory and check the name against Active Directory.
      ·Set computer name as OSDComputername TS variable (assuming that the name not exists).
      The PowerShell form script and other more details, please refer to the following link:
      http://idanve.blogspot.com/2017/11/verify-computer-name-against-active.html
      Note: This is not from MS, just for your reference.

    Thanks for your time.


    If the response is helpful, please click "Accept Answer"and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Pavel yannara Mirochnitchenko 13,326 Reputation points MVP
    2021-04-07T17:14:55.4+00:00

    This is expected behavior. Your approach of the device naming should be different that you would not have that problem. Absolutelly the best way to name device is use serial number variable, which will then generate AD hostname based on serial. MAC adress is other option. But if you wish to stick to your original naming plan, maybe try to investigate, could you limit Doman Join account to be able to only create new objects, but not write on exsting once. Than will then make your re-install of the existing device harder.

    0 comments No comments

  4. Colin Ford 1,026 Reputation points
    2021-04-30T12:13:40.62+00:00

    Automatic naming is the most common method. An alternative is to build as a Windows auto generated name (like the MININT-XXXX) and then rename to the desired name post domain join. A rename operation will fail if an existing object already exists in the domain, however if you don't prompt or something with a script then you will be left with the auto generated name.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.