Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in regards to this post of mine Clean up Active Directory I was trying to run the command

dsquery Computer -inactive 52 | DSMOVE -newparent OU=Test,OU=Devices,DC=domain,DC=com,DC=au

When I run this command i get the following error message

dsmove failed:'CN=Computer1,OU=Staff PCs,OU=Devices,DC=domain,DC=com,DC=au' is an unknown parameter.

Any ideas what this means? when i remove the device in question from AD then it simply errors on computer2 in the same manner. Have i got the syntax wrong?

share|improve this question
up vote 0 down vote accepted

My piped dsmove commands work (where both yours and Mary's did not), but with one restriction - I have to be able to use dsquery to see the target OU. If dsquery can not see the target ou, and I try to move something into it, I receive this (backward?) error:

dsmove failed:<object I am trying to move>:Directory object not found.

Issue the command:

DSQuery.exe ou -name *test*

(or whatever OU you're trying to move to). Do you get a proper DN? Or no returned data?

Re-issue the dsquery ou command and search for another OU. Can you move the object to that OU?

The difference for me is the class type - OU=Computers (which in ADUC looks nearly like any other OU) is of a class "container" and my dsmove fails. The OU to which my dsmove succeeds is of a class "organizational unit".

If I right click the OU and selecting the object tab from within ADUC, I can see that it is Container or Organizational Unit.

What do you think? Are you trying to move to a class "container" OU?

share|improve this answer
I revisited this and still having the same issues. – JohnyV Apr 27 '11 at 23:04
JohnV, If you right click the OU to which you are copying the object, select properties, and click the object tab, is it a 'container' class or 'organization unit' class? – RobW Apr 28 '11 at 0:51

Interesting. I'm seeing the same behavior. Directly putting the entry into the right side of the pipe works, but using it to string commands together does not. You might try working around this using a for loop; this worked for me, anyway:

for /f %f in ('dsquery computer -inactive %yourcount') do dsmove %f -newparent %yourparent


share|improve this answer
Sorry could you explain your statement above there are some variables that i am not familiar with.Thanks for your response. – JohnyV Feb 8 '11 at 4:02
Mmm. The %yourcount corresponds to 52 in your example. %yourparent corresponds to the test ou from your example. Or are you referring to the for loop? for /? for usage. – RobW Feb 10 '11 at 21:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.