Move Computer to Different OU During UDI OSD - Computer Object Exists in AD

We're currently trying out SCCM/MDT 2012 SP1 UDI for deploying images, replacing our standalone MDT 2012 server. We really like that the UDI gives us options since in our environment, we place computers in different OU depending on department. One thing I've noticed is that if I'm imaging a machine that already has an existing computer object in AD, even though I choose a different OU on the New Computer Details page, it will stay in the same OU the object already exists in. 

Is there a way to get SCCM to move the computer object to the selected OU during OSD without deleting it first from AD? This would be especially useful during UDI Refresh scenarios, since the whole point of moving to SCCM UDI is to cut down on the manual configurations after imaging. Thanks. 

June 3rd, 2014 2:59pm

Hi,

Yes, you can use a script like this, http://ccmexec.com/2010/12/move-computer-to-the-correct-ou-during-deployment/ then it will move the computer to the OU that is specified.

Regards,
Jrgen

Free Windows Admin Tool Kit Click here and download it now
June 3rd, 2014 3:06pm

run a script to delete the machine out of AD before you start?

Maik's web service will do all of that stuff for you.

June 3rd, 2014 3:57pm

More info:

Dynamically join Computer to AD OU during OSD with SCCM

http://www.the-d-spot.org/wordpress/2013/04/01/dynamically-join-computer-to-ad-ou-during-osd-with-sccm/

Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

Free Windows Admin Tool Kit Click here and download it now
June 3rd, 2014 10:48pm

More info:

Dynamically join Computer to AD OU during OSD with SCCM

http://www.the-d-spot.org/wordpress/2013/04/01/dynamically-join-computer-to-ad-ou-during-osd-with-sccm/

Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

June 5th, 2014 2:04pm

If the object already exists in the AD (assuming the computer name is the same), I'd do it like this:

  • First join domain (it will use the same object and OU which it was before re-imaging)
  • Move the computer object to correct OU

First part can be done with built-in ConfigMgr task sequence steps, the second part I'd go with Jrgen's script as posted above (http://ccmexec.com/2010/12/move-computer-to-the-correct-ou-during-deployment/).

Do you have to use UDI? What are the requirements for your "quite a few" OUs? Are they location aware, could you use workstation gateway as a rule for your OUs? If you want to use UDI, you would just need to create a dropdown box for the OU and store it into a variable and use that variable with Jrgen's script.

Free Windows Admin Tool Kit Click here and download it now
June 5th, 2014 2:19pm

If the object already exists in the AD (assuming the computer name is the same), I'd do it like this:

  • First join domain (it will use the same object and OU which it was before re-imaging)
  • Move the computer object to correct OU

First part can be done with built-in ConfigMgr task sequence steps, the second part I'd go with Jrgen's script as posted above (http://ccmexec.com/2010/12/move-computer-to-the-correct-ou-during-deployment/).

Do you have to use UDI? What are the requirements for your "quite a few" OUs? Are they location aware, could you use workstation gateway as a rule for your OUs? If you want to use UDI, you would just need to create a dropdown box for the OU and store it into a variable and use that variable with Jrgen's script.

The OU are based on location, but I'm not sure what you mean by "workstation gateway". Computers are all located in two connected buildings, and each department has an OU. 

Any links on resources for creating custom UDI pages? I don't really do any kind of design stuff, I deal mostly with help desk and systems administration. Thanks. 

June 6th, 2014 9:53am

I meant the network gateway the workstations have configured? They are in different subnets, correct? Then you could simply use dynamic variable to set the OU -variable based on the network adapter's gateway configuration. This way you wouldn't need any manual work on defining where the computer goes...

More on dynamic variables can be found here: http://allthingsconfigmgr.wordpress.com/2013/07/24/task-sequences-in-configmgr-2012-r2/

Free Windows Admin Tool Kit Click here and download it now
June 6th, 2014 10:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics