- 0
Move Computer to Specific OU During Build - Based on Hardware type and Computer Name
Asked by
countdown2008
Asked by
countdown2008
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hi guys, I am attempting to move a computer (laptop or desktop) to a specific OU as part of my build process.
The build goes absolutely fine but it doesn't join the domain and joins to a workgroup.
The script which I have been using is detailed here:
http://blog-en.netvnext.com/2012/02/osd-automate-domain-ou-name-from.html
What I basically want to do is get the task sequence to interrogate the device to understand if its a desktop or a laptop and then move it to a specific OU based on the first two characters of the host name and hardware type. I was initially using the IsVM, IsLaptop, IsDesktop vairables but that seemed to be kind of flakey as I was testing in my lab with VMs only. So for the VMs I changed to use WMI query instead.
I setup a couple of new task sequence variable steps to help with this process so if it was a laptop run OUMoveLaptop.vbs to get it into the correct OU and the same sort of process for the desktops (with an OUMoveDesktop.vbs script) in the Post Install phase between the Apply Windows Settings and Apply Network Settings steps.
I've attached the screenshots of what I have setup and hopefully one of you kind guys can help me out before I launch this server out my office window.
Thanks in advance...
Share this post
Link to post
Share on other sites