April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

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.

LDIFDE-Export-AD-objects-CMD-300x221

 

 

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-300x93

 

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-300x117

 

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-300x100

 

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-300x185

 

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>