How to Import Mail Contact into Active Directory Using CSVDE

How to Import Mail Contact into Active Directory Using CSVDE

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:

DN,objectClass,mail
"CN=Ben Smith,OU=HQ,DC=contoso,DC=com",contact,BSmith@cpandl.com
"CN=Brian Smith,OU=HQ,DC=contoso,DC=com,contact,BrianSmith@cpandl.com

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
Comma Separated Value Directory Exchange (CSVDE)
How to use Csvde to import contacts and user objects into Active Directory
Troubleshooting CSVDE import and export
How to use CSVDE.EXE to back up and restore connection agreements
Step-by-Step Guide to Bulk Import and Export to Active Directory
How to set a user's password with LDIFDE
LDAP Properties for CSVDE and VBScript

This article was inspired by the Directory Services forum post  Import mail contact into Active Directory using CSVDE
Leave a Comment
  • Please add 3 and 3 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Richard Mueller edited Revision 7. Comment: Removed (en-US) from title

  • Richard Mueller edited Revision 5. Comment: Added parameters to command line for import

  • Kurt L Hudson edited Revision 2. Comment: Updated article with specific example and reformatted related information area.

  • Ed Price MSFT edited Revision 1. Comment: Updated title per style standards.

  • Kurt L Hudson edited Original. Comment: still a work in progress

Page 1 of 1 (5 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Kurt L Hudson edited Original. Comment: still a work in progress

  • Ed Price MSFT edited Revision 1. Comment: Updated title per style standards.

  • Kurt L Hudson edited Revision 2. Comment: Updated article with specific example and reformatted related information area.

  • Command line actually needs to be csvde -i -f c:\Users\NewContacts.csv  - with no switches it exports by default.

  • Richard Mueller edited Revision 5. Comment: Added parameters to command line for import

  • Richard Mueller edited Revision 7. Comment: Removed (en-US) from title

Page 1 of 1 (6 items)