We help IT Professionals succeed at work.

Exporting Active Directory Users and then reimporting them after a complete domain rebuild

285 Views
Last Modified: 2011-09-20
Is there an easy way to export user accounts and/or OU's from Active Directory and then reimport them after a domain rebuild?  I don't want to retype everybodies name over because there are enough other issues I need to deal with when I do this rebuild.
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
Or use csvde to export the users along with the required attributes. Use the below command to export the users in the mentioned OU and all the OUs below it. This command contains all the required attributes.

csvde -j c:\ -m -f c:\users.csv -v -s  -d "OU=ROOT OU,DC=MyDomain,DC=local" -r "(objectClass=user)" -p Subtree -l userPrincipalName,sAMAccountName,DN,givenName,sn,displayName

Now open the CSV and make appropriate modifications in the userPrincipalName and DN attributes of all the users. Create similar OU structure in the target domain and run the following command to import the users.

csvde -i -j c:\ -f c:\users.csv -v -k


I understand that this is a very hard way of doing because of the manual combing of all the user accounts. However you would come accross many unused accounts and get rid of them instead of importing all the junk from the old domain to the new domain.
Rajith EnchiparambilOffice 365 & Exchange Architect

Commented:

Author

Commented:
Thanks for the info.  This may lead me to a much easier solution.  I have some more questions now.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.