Announcement

Collapse
No announcement yet.

Move windows 7 computers from default OU to workstation OU batch

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Move windows 7 computers from default OU to workstation OU batch

    Hi!

    I am trying to move my windows 7 machines from default OU to workstation OU but getting the error.

    Can anyone help?

    Code:
    dsquery * CN=Computers,DC=mydomain,DC=corp"  -filter "(&(objectCategory=computer)(operatingSystem=Windows 7*))" | "dsmove -newparent OU=Workstation,OU=Machines,DC=mydomain,DC=corp
    
    dsmove failed:'CN=windows7computer,CN=Computers,DC=mydomain,DC=corp' is an unknown parameter.
    
    Thanks
    Last edited by Rems; 21st March 2014, 02:06.

  • #2
    Re: Move windows 7 computers from default OU to workstation OU batch

    Have you actually looked at how your typed command line looks like? The distinguished name of both OUs should be, like the query string, placed between double quotation marks. And the double quote sign leading dsmove should not be there!


    /Rems
    Last edited by Rems; 21st March 2014, 02:30.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: Move windows 7 computers from default OU to workstation OU batch

      This works fine.

      dsquery * OU=Test,DC=mydomain,DC=corp -filter "(&(objectCategory=computer)(operatingSystem=Windo ws 7*))" | dsmove -newparent OU=Workstations,OU=Machines,DC=mydomain,DC=corp

      So the only problem I am seeing is when i use this CN=Computers,DC=mydomain,DC=corp and i dont work

      dsquery * CN=Computers,DC=mydomain,DC=corp -filter "(&(objectCategory=computer)(operatingSystem=Windo ws 7*))" | dsmove -newparent OU=Workstations,OU=Machines,DC=mydomain,DC=corp

      Thanks

      Comment


      • #4
        Re: Move windows 7 computers from default OU to workstation OU batch

        sorry.

        It has to do with dsmove. I found on the internet that the problem is with dsmove and now I am reading it I remember this thread again.

        When multiple computers piped in to a dsmove command you get this error.

        here is a work around http://social.technet.microsoft.com/...um=winserverDS

        /Rems
        Last edited by Rems; 21st March 2014, 12:11.

        This posting is provided "AS IS" with no warranties, and confers no rights.

        __________________

        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts

        Comment


        • #5
          Re: Move windows 7 computers from default OU to workstation OU batch

          Thanks.

          I have made modification to filter on windows 7 in your lines and its working.

          Comment

          Working...
          X