Importing contacts from AD into Exchange 2007

There were quite a few things that I had to do in order to get this to work.

Here’s a few commands, then I’ll provide links to all of the places that helped write the commands.

Cmd prompt: (this command exports every contact in your AD Domain into a csv file called, “onlycontacts.csv”)

CSVDE -f onlycontacts.csv -r “(&(objectClass=contact)(objectCategory=person))”

Then in EMC, run: (obviously, this Imports contacts from the previous CSV file, and puts them in as contacts in Exchange.)

Import-Csv onlycontacts.csv | ForEach { New-MailContact -Name $_.displayName -Firstname $_.FirstName -LastName $_.LastName -ExternalEmailAddress $_.Mail -OrganizationalUnit “somethinggoeshere” }

New-MailContact

CSVDE -f Export examples user accounts from Active Directory to spreadheet

How to use Csvde to import contacts and user objects into Active Directory

Re Importing External mail contacts in to Exchange 2007 – TechNet Forums
How to use Csvde to import contacts and user objects into Active Directory

Posted

in

by

Tags:

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.