1

We are trying to bulk import contacts with CSV as follows:

Import-Csv .\ExternalContacts.csv|%{New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}

We get an error because some contacts have the same proxy addresses attribute. There are multiple doctors with the same address (ie: 5555555555@domain.com).

How would one fix this or work around it?

Glyph
  • 111
  • 1

1 Answers1

0

We get an error because some contacts have the same proxy addresses attribute.

To find the mailboxes(User Mailboxes, Resource Mailboxes, and Shared Mailboxes), Contacts/Users and Groups which have the same proxy addresses(55555@domain.com), you could run the command " Get-Mailbox | where {$_.EmailAddresses -eq “<55555@domain.com>”} ", " Get-MailContact | where {$_.EmailAddresses -eq "<55555@domain.com>"} " and " Get-DistributionGroup | where {$_.EmailAddresses -eq "<55555@domain.com>"} ": enter image description here enter image description here enter image description here

If there is the same proxy address 55555@domain.com, you could remove it by running the command(Such as mailboxes) " Set-Mailbox -Identity -EmailAddresses @{remove="xxxxx@domain.com"} ", then you could continue to import contacts.

Ivan_Wang
  • 1,333
  • 1
  • 4
  • 4