Office 365 - Change all emails to first.lastname@domain but keep the login email

sil4-1439 6 Reputation points
2021-03-08T08:41:15.66+00:00

Hi Guys,

we have around 1500 mailboxes on Office365 and the Company asked us to Change all Email Address to:
Firstname.lastname@keyman .com BUT we need to keep the Login Email the same so it wont cause disconnection on all outlooks

I've been trying to find the proper PS script online but couldn't found one that matches the office365

would love to get some help on this one

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,193 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,381 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 95,666 Reputation points MVP
    2021-03-08T11:22:39.877+00:00

    First things first - are those users provisioned directly in the cloud or being synchronized from AD/external system? In the latter scenario, you will need to make the changes there and wait for sync to happen.
    If they are managed directly in Azure AD, you can use the following cmdlet:

    Set-Mailbox user@domain.com -WindowsEmailAddress new@domain.com  
    

    The above will add new@keyman .com as the current primary SMTP address, while keeping the old one as secondary address, and is the easier way to make this change in O365. You can run this in bulk based off a CSV file or just directly leverage the firstname/lastname values for each user. Here's an example for the former:
    https://social.technet.microsoft.com/Forums/msonline/en-US/66165391-1bb9-4925-a2e7-fbe701654b00/bulk-change-primary-smtp?forum=onlineservicesexchange

    1 person found this answer helpful.

  2. Rich Matheisen 45,091 Reputation points
    2021-03-08T20:16:30.36+00:00

    You only need to change the Exchange Email Address Policy for your organization. Exchange will preserve the current email addresses for each mailbox as a secondary SMTP proxy address and change the primary SMTP address as per the policy that's applicable to the mailbox-enabled or mail-enabled objects.