Adding multiple Email addresses to mail contacts in Office 365

When using the Office365 admin panel, you can only add a single email address to a mail contact.

If you want to add multiple addresses, you have to use PowerShell. Use the following set of commands to add and confirm these addresses.

  1. To connect powershell to Office 365, perform the following;
  2. Open powershell
  3. Type the following command;
  4. $Cred = Get-Credential
  5. Enter the username / password of a valid O365 admin account
  6. Type the following command;
  7. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/
    -Credential $Cred -Authentication Basic –AllowRedirection
  8. Type the following commands;
  9. Import-PSSession $Session
  10. Powershell is now attached to Office365 Exchange and we can run the command to add addresses to the mail contact. The primary address should have uppercase SMTP: prepended - there can be only one uppercase entry for a specific address type.
  11. set-mailcontact "User Name" -EmailAddresses "SMTP:This email address is being protected from spambots. You need JavaScript enabled to view it. ","smtp:This email address is being protected from spambots. You need JavaScript enabled to view it. "
  12. To confirm this has worked run the following command
  13. get-mailcontact "User Name" | select -ExpandProperty EmailAddresses
  • 1
  • 2