There are two ways to import and export Active Directory data:
1. LDIFDE: Data is exported from the AD object by object to a file in the Lightweight Data Interchange Format (LDIF) that is saved with a .ldf extension. Notepad or Wordpad can be used to edit the exported data. Furthermore, this utility can create, modify and delete AD objects. The LDIFDE utility allows users to import data in relation to other user accounts along with the passwords.
2. Comma-Separated Values Data Exchange (CSVDE): Exported data is stored in a .csv file which can be edited with database applications, such as Microsoft Access or Microsoft Excel. This utility also enables users to import data from database applications that support the CSV file format. Unlike LDIFDE, the CSVDE utility can import and export AD objects, but not user passwords.
LDIFDE and CSVDE will be explored below.
LDIFDE – Import all AD objects:
Navigate to Start, type CMD and right click it to open as administrator from the drop down list.
Type the following:
ldifde -i -f import.ldf
Press Enter
If you want to specify a location for the log file created and to ensure that certain errors are ignored, type the following:
-j “C:\Users\Administrator” -k
LDIFDE Reference:
-i parameter: specify that it is an import operation
-f parameter: specify that the data is either imported or exported to a the import.ldf file or export.ldf file consecutively (in our example).
-j parameter: specifies a location for the log file generated
-k parameter: ensures that certain errors are ignored
CSVDE – Export all AD objects (using Unicode formatting):
Navigate to Start, type CMD and right click it to open as administrator from the drop down list.
Type the following:
csvde -f export.csv -u
Press Enter
CSVDE – Import all AD objects
Type in the following:
csvde -i -f import.csv
The AD objects are imported from the source file.
If there are any errors with this operation (as shown in our example below), this is clearly visible in the Command Prompt.
Recent Comments