[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2205
  • Last Modified:

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?
1 Solution
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now