VBScript for Moving Computer Objects Fails in SCCM 2007 R3 Task Sequence?
Greetings,
I am trying to automate the process of moving a computer object into a new OU during OSD, using SCCM 2007 R3. To accomplish this, I am using a VBS script that I found on
Coretech Blog. My service account for running the script has the appropriate permissions for moving computer objects in AD, and the script works perfectly when it is run manually. However, the script will not execute properly when it is run inside of the
deployment task sequence.
The screenshot above illustrates how I am attempting to run the script in task sequence. It immediately follows the domain join, and runs as an account with appropriate permissions. In this particular case, Im executing a variant of the MoveOU.vbs script
that includes logging.
Although the task will complete in TS, logs show that the script never fully executes because of Error code 424: Object required. The object is the distinguished name of the OU, which I provide in command-line. So, it appears that my entire argument is
not getting passed through in the task sequence, though Im not entirely sure why.
Has anyone run across a similar issue running VBscripts in task sequence? Or, has anyone used alternative methods to move computer objects during OSD? I appreciate any help you can provide, and I can supply logs upon request.
Thanks!
[also posted to The Official Scripting Guys Forum]
April 26th, 2012 3:41pm
I use the same script many times and it works great. The script reads the computerDN from the AD objects so try adding a reboot after the Join domain step as the computer must boot as a domain member for the computerDN lookup to work.
Regards,
Jrgen-- My System Center blog ccmexec.com -- Twitter
@ccmexec
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2012 3:58pm
Just from the screenshot above, it looks like you have smart quote in the command-line instead of a normal quotes. Smart quotes are curly in look and are what Word and other Office apps use and IE also. If you directly copied and pasted that line from
somewhere else, then that's what has probably happened. Simply replace the quotes with normal quotes and you should be good.Jason | http://blog.configmgrftw.com | Twitter @JasonSandys
April 26th, 2012 4:52pm
If you use this script with "run this step as the following account" my experience was that I have to add the executing user first to the local admin of this computer (I do it with a command line TS Step. the command was
net localgroup "Administrators" "yourDomain\yourUser" /add
regards
Stefan
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2012 5:31am