Web Service with PC not yet in AD

Jan 11, 2013 at 1:21 PM

I have been using the 7.3 web service for sometime now and I love it!!  More specific I use the MoveComputertoOU function during my deployments.  It works awesome. 

My question is:  How can I handle "In MDT" a brand new/ out of the box computer and join it to a StagingOU and then move it to an OU that I specify and the end of deployment?  I could have the techs put the computer in AD before deployment but they do not have rights so I am looking for an automated way to do it.

Example:  PC joins StagingOU      OU=MDTStage, DC, DC.  Run the swap value script to change to the FinalOU, and run the MoveComputertoOU as one of the final steps in my TS.

I have created a setting in my MDT database called FinalOU.  I was hoping I could call on that value in some way.  Maybe I am just making this difficult.  :(

This all works like a peach when the computer is in AD already but I can't figure out a solid solution if it is a brand new computer.  Any help or direction that could be given would be outstanding as I have been banging my head on this for a couple weeks.

Thank you in advance.

Jan 11, 2013 at 2:00 PM

Hi,

thanks for using the web service.

One way of solving this is to create the process in a way, that it handles new machines and re-images the same way. I outlined a possible solution here: http://myitforum.com/cs2/blogs/maikkoster/archive/2010/04/08/moving-computers-in-active-directory-during-mdt-deployments-step-by-step.aspx.

 

The basic idea here is to define the final OU in "MachineObjectOU" as that's the property which should be used in default. Then in cs.ini, you define a "StagingOU" and give it a value. Now at the beginning of the Task Sequence, you simply swap the values of StagingOU and MachineObjectOU and have it move any existing computer account to the "MachineObjectOU" (which now contains the StagingOU as value).

If the computer joins, it will always be in the StagingOU, either as it's already being moved to it, or as it directly joins into this OU, as this is based on MachineObjectOU (which still contains the StagingOU value). Now the TaskSequence keeps going and at the very end, you just swap the values back and move it to the MachineObjectOU. It's the same web service call, but now MachineObjectOU no longer contains the value of the StagingOU it rather contains the value of whatever you configured before for MachineObjectOU.

 

Regards

Maik

Jan 11, 2013 at 2:46 PM

You know sometimes it is the smallest things.  I have read that post you listed above a thousand times and was trying to figure something out.  It turns out it was right in front of me the entire time.  :)  I just needed to add the swap values at the beginning of the TS as well as the end.  Everything else was in place.  Oh well it was a good learning experience.

 

I really appreciate the help!!!