How to use Csvde to import contacts and user objects into Active Directory
September 6, 2001
Microsoft Knowledge Base Article 327620 contains the following summary:
This step-by-step article describes how to use the Csvde.exe utility to create contacts and user accounts in Active Directory. You may have to use this method in some scenarios, for example, when administrators want to export custom recipients from Microsoft Exchange Server 5.5 and import them into Active Directory as Microsoft Windows contacts.
Csvde.exe is a Microsoft Windows 2000 command-line utility that is located in the SystemRootSystem32 folder after you install Windows 2000. Csvde.exe is similar to Ldifde.exe, but it extracts information in a comma-separated value (CSV) format. You can use Csvde to import and export Active Directory data that uses the comma-separated value format. Use a spreadsheet program such as Microsoft Excel to open this .csv file and view the header and value information. See Microsoft Excel Help for information about functions such as Concatenate that can simplify the process of building a .csv file.
Note Although Csvde is similar to Ldifde, Csvde has a significant limitation: it can only import and export Active Directory data by using a comma-separated format (.csv). Microsoft recommends that you use the Ldifde utility for Modify or Delete operations. Additionally, the distinguished name (also known as DN) of the item that you are trying to import must be in the first column of the .csv file or the import will not work.
The source .csv file can come from an Exchange Server directory export. However, because of the difference in attribute mappings between the Exchange Server directory and Active Directory, you must make some modifications to the .csv file. For example, a directory export from Exchange Server has a column that is named "obj-class" that you must rename to "objectClass." You must also rename "Display Name" to "displayName."
For more information about attribute mappings, click the following article number to view the article in the Microsoft Knowledge Base:
281563 Exchange Server 5.5 to Exchange 2000 attribute mappings for the Migration Wizard
Use the following syntax to run the tool from a command prompt:
csvde -i -f c:filename.csv
The minimum required attributes are listed in this article for each type of object that you may want to create, and sample .csv file headers are provided. Note that the minimum required attributes for one organization may not meet usage requirements for another organization. Use ADSI Edit or Ldp.exe to view the attributes for existing users and to verify the attributes that you may need or want for your scenario.
Warning If you use the ADSI Edit snap-in, the LDP utility, or any other LDAP version 3 client, and you incorrectly modify the attributes of Active Directory objects, you can cause serious problems. These problems may require you to reinstall Microsoft Windows 2000 Server, Microsoft Windows Server 2003, Microsoft Exchange 2000 Server, Microsoft Exchange Server 2003, or both Windows and Exchange. Microsoft cannot guarantee that problems that occur if you incorrectly modify Active Directory object attributes can be solved. Modify these attributes at your own risk.
About the Author
You May Also Like