There’s a great and useful tool available for quick and easy imports and exports forActive Directory called CSVDE. This allows you to take an excel file of contacts,save it out as a CSV and then easily import into AD under a certain OrganizationalUnit.
This website http://www.computerperformance.co.uk/Logon/Logon_CSVDE.htm hastons of information on CSVDE.
A quick example:
From your DC open a command prompt and type csvde -f output.csv and you will get afull dump of your AD schema to the named csv file. This will also give you all theheaders you can use for importing.
Now lets say you want to import into an OU called “Apple” all the outside contactsfor that OU which you’ll later create an Address List in Exchange 2007 and add themto.
Create a CSV file with the following format:
DN,objectClass,displayName,proxyAddresses,targetAddress,mailNickname,mail,msExchPoliciesExcluded,company
“CN=Jim Smith,OU=Apple,DC=mydomain,DC=local”,contact,Jim Smith,SMTP:jim.smith@apple.com,SMTP:jim.smith@apple.com,JSmith,Jim.Smith@apple.com,{26491cfc-9e50-4857-861b-0cb8df22b5d7},Apple
The 26491cfc just corresponds to a checkbox selection for Exchange.
These will be created as Mail Enabled Contacts in the “Apple” organizationalunit in Active Directory. Save your file as myimport.csv
Open a command window and run csvde -i -f myimport.csv and violla!you’ve got contacts imported!
Now in Exchange 2007 you can go in to the Management Console andunder “Organization Configuration” click “Mailbox” and choose the “Address Lists”tab. Click “Add Address List.” As the selection criteria set it to “Contacts withexternal e-mail addresses” and then after hitting next choose a condition of “recipientis in a company” and click the underlined blue text to add the company name you providedin your csv file (we used Apple). Clicking next, next, and finish will process theaddress list.
