General discussion


Move Computers to OUs Based on username

By Aaron_Wurthmann ·

So I have thousands of computers in the Computers container and I would like to move those systems (that are all based on usernames) into their proper site OUs. Sounds easy enough, at first glance I thought it sounded like a job for "csvde" so I read around.. "And apparently that isn't correct". Csvde can't move objects just add. So now what? I have a list of usernames to sites, I have a list of OUs but how do I script this massive migration based on user name.

aaronw-lap and aaron-desk are in the Computers container but should be moved to the "corp" OU.

Only thing I could really think of off the top of my head is a macro. That is fine but that is quite messy and prone to error.

Can you share with me how you have completed this task in your organization or point me to a tool that can do the job or s script sample, etc.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by Joseph Moore In reply to Move Computers to OUs Bas ...

Boy, that is a lot of machines.
I would suggest trying LDIFDE to export out the machines you want to move, then modify the exported file, then import it back in and see what happens. LDIFDE uses LDAP connectivity to talk to a Windows 2000/2k3 domain controller.
Here is a Technet article on LDIFDE:

I am not good at LDIFDE syntax so I can't post the right syntax. But take a look at the Technet article for suggestions.

Collapse -

by Aaron_Wurthmann In reply to Move Computers to OUs Bas ...

To: Joseph Moore
Yeah it does the same thing csvde does which is import and export, but I don't think you can't move objects. I gotta move them and worse yet I have to move them to their proper OUs. I think I am going to be stuck writting some vb to do this for me. I found a move to OU script on the MS website. Now I gotta figure out how to build arrays. I'll keep ya posted.

Related Discussions

Related Forums