Exchange Online - Change primary email address, name and alias of a shared mailbox

Occasional Contributor

Hi All,


I have been asked by HR to change the email address, name and alias of a few shared mailboxes that were set up last year. For example, I need to change "" into "", and the name/alias consequently. I need to do the same for 9 other mailboxes which have "sec" in the email address.

Is it safe to run the following command:


set-mailbox -EmailAddress "","" -Name jobs-maths -DisplayName jobs-maths -Alias jobs-maths


Will the old name stay in other properties? I would need to keep all the old emails sent to the old address.

Thank you in advance for your help!

2 Replies
best response confirmed by fstorer (Occasional Contributor)

When changing the primary SMTP address, it's usually a good idea to keep the old one as secondary, to avoid unnecessary NDRs. So in the syntax you used, make sure to add it as well, or you can use the -WindowsEmailAddress parameter:


Set-Mailbox user -WindowsEmailAddress


which basically changes the primary address to the value you specify, while preserving the old one as secondary. Then do the rest of the attributes as needed.

Thank you @Vasil Michev for your help!

I will add that parameter to the script!