Export active directory accounts/groups and import into another domain

We have 2 separate domains. There is no trust between the 2.

We'd like to export the user list from 1 domain, and import it into the other.

What is the easiest way with instructions on how to do this?
LVL 16
LegendZMPrincipal Security ArchitectAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ahmed Abdel SalamPh.D. CandidateCommented:
you can try the Active Directory Migration Tool, or read the following:


This may help you
Easiest way is to use the LDAP command (LDIFDE) to export and import users. This should be executed at the server's command prompt.

the following will export all users in domain YOURDOMAIN to a file called ExportUser.ldf
ldifde -f ExportUser.ldf -s YOURDOMAIN -r "(objectclass=user)"

The following will import users from the file newuser.ldf to your domain NEWDOMAIN
ldifde i -f newuser.ldf -s NEWDOMAIN

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

LegendZMPrincipal Security ArchitectAuthor Commented:
hbustan, what do the 2 !! in the import LDIFDE command represent?
it should read "minus i":

ldife -i -f newuser.ldf -s NEWDOMAIN
LegendZMPrincipal Security ArchitectAuthor Commented:
So this will work to export from the old domain to the new domain?
when you say OLD DOMAIN / NEW DOMAIN
do you mean domain.local  or just the domain name?

OLD Domain and NEW Domain are just references for the 1st domain you are exporting from and 2nd domain you are importing to.

Once you export, you can modify the .ldf file before importing to the 2nd domain for reasons such as your organizational units might be structured differently in the other domain or so. Usually a text editor (Even Notepad) is sufficient and a Search and Replace technique can be used for mass changes. If your domains are identical, then you can import immediately without modifications to the .ldf file.

Domain refers to the Domain name of the AD Domain
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.