This quick guide will show you how to import a CSV file into Exchange and create multiple contacts:

Contact

In Excel create 4 Columns:

  • Name
  • Firstname
  • Lastname
  • ExternalEmailAddress

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.

Hope it helps.

Advertisements
Advertisements