Exchange 2010: Create mail enabled contacts in bulk

 Source - https://social.technet.microsoft.com/wiki/contents/articles/29968.exchange-2010-create-mail-enabled-contacts-in-bulk.aspx

In Excel create 4 Columns:

  • Name
  • Firstname
  • Lastname
  • ExternalEmailAddress

Contact

Now from the Exchange Management Shell run the following command:

Import-Csv “contacts.csv” | ForEach {New-MailContact -Name $_.Name -Firstname $_.FirstName -LastName $_.LastName -ExternalEmailAddress $_.ExternalEmailAddress -OrganizationalUnit “Domainname/OUname”}


Contact2

In the EMS it will go through the list in the CSV file and create the contacts one by one. If there is a problem with a contact, for example it already exists then an error will be displayed and the import will continue.

No comments: