Exchange OnlineLatestMicrosoft Office 365Office 365 IdentitiesPower ShellSoftware Support

Change a user name and email address in Office 365 with PowerShell

Install required software

These steps are required once on your computer, not every time you connect.

  1. Install the 64-bit version of the Microsoft Online Services Sign-in Assistant: Microsoft Online Services Sign-in Assistant for IT Professionals RTW.

    IT Dukes
  2. Open Power Shell as an Administrator

    It Dukes
  • Go to Start
  • Search for Power Shell
  • Right click on Windows Power Shell
  • Run as Administrator

3. Run the following commands

Install-Module MSOnline
Connect-MsolService

Set-MsolUserPrincipalName -UserPrincipalName user@currentdomain.com -NewUserPrincipalName user.new@domain.com

If you only want to change the Email Address not username Follow this link
Change User Primary Email Address In Office 365 With PowerShell without changing the username