Using DSMOVE to move inactive computers to a new OU

7,565

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:
7,565

Related videos on Youtube

JohnyV
Author by

JohnyV

Updated on September 17, 2022

Comments

  • JohnyV
    JohnyV almost 2 years

    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?

  • JohnyV
    JohnyV over 13 years
    Sorry could you explain your statement above there are some variables that i am not familiar with.Thanks for your response.
  • RobW
    RobW over 13 years
    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.
  • JohnyV
    JohnyV about 13 years
    I revisited this and still having the same issues.
  • RobW
    RobW about 13 years
    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?