Migrating OU structures in Windows 2003 Server

Aug 27, 2002
10,043
2
0
Anyone know of a tool to easily pull the OU structure into a .csv file, that can easily be imported/copied into AD.

We have a test lab to migrate our users/groups into AD, and we are restructuring at the same time. I don't want to make the OU structure twice.
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
It's been a long time since I've done it but I believe if you use CSVDE to import objects into the "new" OU structure it will create the new OUs in their proper places.

If you're just looking to do the OUs (without objects) I'm not aware of an application that will do this. However it would probably be possible to script it (doing dsquery on the source domain and modifying the output as required than using dsadd on the target domain).

good luck,

-Erik
 
Aug 27, 2002
10,043
2
0
yea, I can move all of it, but our network is constantly changing. I want to just create the OU's (in our test environment) and we will manually move the objects into the structure. (we will be migrating groups/users w/passwords as well as several varying service accounts)

If there is a way to just automate the OU creation process that would really be all that we need.

We have too much to sort through to write our own scripting. (I don't write scripts myself, but we have a couple of engineers who do)
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
You can run the following:

'ldifde -f exportOu.ldf -s Server1 -d "dc=Export,dc=com" -p subtree -r "(objectClass=organizationalUnit)" -l "cn,objectclass,ou"' This will export all OUs in the domain except domain controllers into a file called exportOu.ldf.

To import, run the following:
Open the file in notepad, and use edit/replace to find all instances of the word Export and replace it with Import. Then save the file and run 'ldifde -i -f ExportOU.ldf'