It’s easy to Set the Primary Email Address on Office 365 with PowerShell using the Set-Mailbox cmdlet. The primary address is defined using “SMTP” in uppercase in the email address. For example:
Set-Mailbox -Identity "test.user" -EmailAddresses SMTP:test@tachytelic.net,smtp:test2@tachytelic.net
Note: The Set-Mailbox cmdlet will remove all existing aliases, so include them with the command.
Enter the details of the mailbox to be changed in the form below, and PowerShell code will be generated. It includes the required PowerShell to connect to Office 365.
Set the Primary Email Address on Office 365 using Powershell
Set the Primary Email Address on Office 365 when the user is being managed by the local active directory
The steps above will work if the user that you are changing is cloud managed. If your accounts are synchronised from your local active directory, then they will be out of the write scope of Office 365. If that is the case please follow the instructions on this page:
http://tachytelic.net/2018/08/office-365-how-to-change-primary-email-address/
Amanda says
It’s a nice script for one user, but I need to change 100 + users. How do I go about doing that?
alan says
how to update users with primary email address from old domain to new domain