To add contact records to Active Directory using CSVDE, you need only define the Lightweight Directory Access Protocol (LDAP) location in the directory where you want to place the contact (DN), object class (objectClass), and email (mail) address for each entry. For example, assume that you have the following file named NewContacts.csv. The contents of the NewContacts.csv file in the C:\Users folder has the following three lines:

"CN=Ben Smith,OU=HQ,DC=contoso,DC=com",contact,

"CN=Brian Smith,OU=HQ,DC=contoso,DC=com,contact,

After running the command csvde -i -f c:\Users\NewContacts.csv you would see output similar to:

Connecting to "(null)"

Logging in as current user using SSPI

Importing directory from file "NewContacts.csv"

Loading entries...

2 entries modified successfully.

The command has completed successfully

Then you could go verify that your contact records were added by using an LDAP tool, like LDP.EXE or ADSIEDIT.EXE or just Active Directory Users and Computers (dsa.msc) as shown in the following figure.

Related information


This article was inspired by the Directory Services forum post  Import mail contact into Active Directory using CSVDE