OU Move Step Failing with odd error
I have a task in my OSD TS that is supposed to use DSQUERY and DSMOVE to have a machine move itself into the proper OU from wherever it happens to be when it gets imaged. I have verified that DSQUERY and DSMOVE are in the image and work properly if run outside the TS. I have verified the "Run As" credentials several times and have tried two different accounts that both have rights to these OUs (one is a Domain Admin and one is an Account Operator). When the step runs, I get this error: =======================[ smsswd.exe ] ======================= PackageID = '' BaseVar = '', ContinueOnError='' SwdAction = '0001' Getting linked token failed to get the token information Get RunAs private desktop SMSTS-97485\SMSTSDesktop Run command line under a user account Command line for extension .exe is "%1" %* Set command line: Run command line Working dir 'not set' Executing command line: Run command line Create a process under given user token Process completed with exit code 255 Command line returned 255 I don't understand what that means and tasks run both before and after this task (using the same Domain Admin account) run just fine with no errors. Below are the exact task settings: Type: Run Command Line Name: Move Computer to New OU Description: N/A Command line: cmd /c "dsquery computer -name %computername% | dsmove -newparent "OU=Computers,OU=Test OU,DC=test,DC=local"" Disable 64-bit file system redirection: No Start in: N/A Package: N/A Time Out: 2 minutes Run this step as the following account: test\domainadmin1 Disable this step: No Success codes: 0 3010 Continue on error: Yes
August 30th, 2011 12:06pm

When I create a package/program which just runs a command line, I start with cmd /c, like yours is doing. But when I use a Command Line in a TS, I don't. So try simply: "dsquery computer -name %computername% | dsmove -newparent "OU=Computers,OU=Test OU,DC=test,DC=local"" --Joe.
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 12:17pm

Disable x64 redirection in the taskJay Parekh Project Leadership Associates http://www.projectleadership.net
August 30th, 2011 12:23pm

and remember that the Computers container is not an OU.. My step by step SCCM Guides I'm on Twitter > ncbrady
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 12:26pm

His Computer OU is under the Test OU from the rootJay Parekh Project Leadership Associates http://www.projectleadership.net
August 30th, 2011 12:28pm

Correct - the Computers OU I'm trying to move it to is in fact a Sub-OU of the "Test OU" OU. I'm not trying to move computers to the default Computer container. I will try it without the cmd /c, Joe and I will check the "Disable x64 redirection" box, jparekh. I'll let you know how it goes.
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 12:32pm

Joe, do you think the pipe to DSMOVE will work without CMD /c? Isn't pipe native to the CMD environment? JParekh, wouldn't the Disable x64 redirection option make it so the system would not look for .exe's in the system32 folder? That is where I have placed dsmove and dsquery... not sysWOW64
August 30th, 2011 1:08pm

I've never piped within a TS, but you are already calling a CMD by adding the Run command line step. So honestly, I am not sure, but I think it will work.--Joe.
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 1:10pm

I just don't understand why, after the TS is finished, I can log into the box as the account I specify in the TS, go to Start -> Run and type the exact same command, verbatim, from the TS and it works perfectly. Isn't that essentially all SCCM is doing in the "Run Command Line" step?
August 30th, 2011 1:32pm

This is not a direct answer to your question, but I always use a script like the one here: http://blog.coretech.dk/jgs/vbscript-move-computer-object-to-another-ou-via-command-line-parameter/My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 2:17pm

I know I had issues in the past with x64 OS calling command lines with that not enabled.Jay Parekh Project Leadership Associates http://www.projectleadership.net
August 30th, 2011 2:20pm

try running the same step via psexec as system and see what result you get My step by step SCCM Guides I'm on Twitter > ncbrady
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 3:24pm

Jparekh, you were right. We have a running joke around here that with SCCM, there's always some checkbox messing something up. Disable 64-bit redirection made it work. I just wish SCCM gave more useful error messages since it is so finicky. Thanks a million.
August 30th, 2011 4:59pm

Cool. Yes, checkboxes and refresh are your best friends in ConfigMgr. Enjoy!Jay Parekh Project Leadership Associates http://www.projectleadership.net
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 5:03pm

Theres a few other ways you could do this.. a) If you always are going to add to the same OU, you can use the "Apply Network Settings" Task Sequence Step. You just need to specify a domain account and the FQDN and domain OU. b) Create a blank AD record in the OU you want it to be in then use the "Apply Network Settings" and specify the Domain but leave the "Domain OU" blank. The Apply Network TS step will join your computer to the existing AD record c) Create a VBscript to specify the OU by writing to the TS Variable and execute it via "Run Command Line." Then use "Apply Network Settings" and leave the OU blank.        Set objTSEnv = CreateObject("Microsoft.SMS.TSEnvironment")         objTSEnv("OSDDomainOUName") = "OU=Computers,OU=Test OU,DC=test,DC=local"
August 31st, 2011 2:18am

Hi All, Anyone know of a way to perform an OU *move during the task sequence if you are NOT using MDT? I've tried the above options, with 2 TS steps that are of signifigance. 1. During the POST Install section of the TS, we have added the "Apply Network Settings" step that joins the domain (this part is successful), and we also have the Domain OU set to the targeted OU. (Note - this TS is for rebuilds, and the PC's are in another OU before running this TS, we would like this TS to MOVE the PC to another OU). We are using an account that has permissions to perform this operation. 2. During the POST Install section of the TS, after the step above runs, we then have a TS step called "Move Computer" - which runs a command line, executes the following command line: cscript.exe %deployroot%\scripts\dsquery computer -name %computername% | dsmove -newparent "OU=Targeted,OU=Workstation,DC=retail,DC=retail,DC=com" (Real OU information has been modified for this posting) Disable 64-bit file system re-direction checkbox is ENABLED. Run this step as an account (Checkbox is ENABLED) and the proper Account is used. The TS runs, but does not MOVE the PC from the source OU to the targeted OU. I should also add that this TS targets windows XP machines and rebuilds them as windows 7. Anyone have any advice?
Free Windows Admin Tool Kit Click here and download it now
August 6th, 2012 2:57pm

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

Other recent topics Other recent topics