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” }
CSVDE -f Export examples user accounts from Active Directory to spreadheet
How to use Csvde to import contacts and user objects into Active Directory
Leave a Reply