add a secondary SMTP address mail for all user


  • Hi guys,

    does anyone know the commands that would give add a secondary smtpAddress for all users with a specific domain

    Thanks in advance

    Friday, July 13, 2018 11:22 AM


All replies

  • Hi,

    Normally you would configure it using Email Address Policies and add the domain there as an secondary address. You can find more about Email Address Polices here:

    You could also do it for a single mailbox as well, both using ECP and PowerShell by following this article:

    If you want do to do it one time only and for multiple users, you can use the following commands:

    $mailboxes = Get-Mailbox | Where-Object {$_.PrimarySmtpAddress -like "*"}
    foreach ($mailbox in $mailboxes)
    	$mailboxalias = $mailbox.alias + ""
    	$mailbox | Set-Mailbox -EmailAddresses @{add="$mailboxalias"} -WhatIf

    If have added -WhatIf so it will not perform any change and you can verify it in your environment before you commit the change. 

    Friday, July 13, 2018 11:38 AM
  • Thanks a lot for your answer JOEL. I'll perform this and revert if it's ok  :) :)

    Thanks again

    Friday, July 13, 2018 11:43 AM
  • Hi Slimhss,

    I'm just writing to check how's everything going? If you have any questions or needed further help on this issue, please feel free to post back. If the issue has been resolved, please mark the helpful replies as answers, this will make answer searching in the forum easier and be beneficial to other community members as well. Thanks for your understanding.

    Best Regards,
    Niko Cheng

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, July 20, 2018 8:33 AM