You can add contacts to Active Directory by using one or more of the following methods:
| • |
By using the Active Directory Users and Computers tool |
| • |
By using the Csvde.exe tool |
| • |
By using the Ldifde.exe tool |
| • |
By adding the contacts programmatically |
Because it may take a long time to add contacts to Active Directory by using the Active Directory Users and Computers tool, we recommend that you use the Csvde.exe tool to add contacts to Active Directory. When you use Csvde.exe, you can modify the import file by using Microsoft Excel. The Csvde.exe tool is included with Microsoft Windows Server 2003 and with Microsoft Windows 2000 Server.
You can use the Csvde.exe tool to easily add many contacts to Active Directory. The Csvde.exe tool uses a comma-separated file format that uses the first line as a header. This header contains a comma-separated list of Active Directory attributes. The following example header file illustrates the minimum attribute set that is required to create a mail-enabled contact:
objectClass,dn,name,cn,sn,givenName,displayName,proxyAddresses,targetAddress,mail,mailnickname
Each set of comma-separated values for the header must be on a single line in the Csvde.exe import file. And, each set of comma-separated values for each contact must be on a single line in the Csvde.exe import file.
Important The
mailnickname attribute is important. Without the
mailnickname attribute, the
E-mail Addresses tab is not displayed in the
UserName Properties dialog box of the user in Active Directory Users and Computers.
The following example demonstrates the use of the header together with example values for a SMTP contact:
objectClass,dn,name,cn,sn,givenName,displayName,proxyAddresses,targetAddress,mail,mailnickname
contact,"cn=Internet User,ou=internet users,dc=xo,dc=one",Internet User,Internet User,User,Internet,Internet User,SMTP:internetUser@remote.domain; smtp:internetuser@xo.one,SMTP:internetUser@remote.domain,internetUser@remote.domain,internetuser
After you add the contacts' attributes to the import file, use the following command-line to import the contacts into Active Directory.
Note The
DN attribute of the contact determines the organizational unit to which the contact is added.
csvde –I –f importFileName.csv