Create a CSV file that contains the following columns:
ExternalEmailAddress
Name
Alias
FirstName
LastName
OrganizationalUnit
Then from the Exchange Management Shell run the following command:
Import-CSV C:scriptsMyCSV.csv | ForEach-Object{New-MailContact -ExternalEmailAddress $_.ExternalEmailAddress -Name $_.Name -Alias $_.Alias -FirstName $_.FirstName -LastName $_.LastName -OrganizationalUnit $_.OrganizationalUnit}
Be First to Comment