1 300 737 205

Importing and Exporting Active Directory Data

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.

 

Procedure:

 

LDIFDE Utility – export 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 -f export.ldf

Press Enter and the data should be exported successfully (as shown below).

LDIFDE-Export-AD-objects-CMD

 

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

LDIFDE-Import-AD-object-only

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-Import-AD-object-with-j-and-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-export-AD-objects

 

CSVDE – Import all AD objects

Type in the following:

csvde -i -f import.csv

Press Enter

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.

CSVDE-import-AD-objects-error-example

 

CSVDE – Reference:

-f parameter – specify the file to export

-u parameter – use Unicode formatting

-i parameter – specify that it is an import operation

Request Your Free Consultation Today

We’ll come to your place of business, and give you a full diagnostic snapshot of your IT systems.