Skip to Content
Communication Square LLC Help Center

Change Primary SMTP Address for Bulk O365 Users

Change Primary SMTP Address for Bulk O365 Users

Written October 2022. Microsoft changes these admin screens often, so the screenshots below may not match what you see today. The sequence of steps is usually still correct — if something looks wrong, tell us and we'll update it.

Requirements:

  •                      CSV File
  •                      Powershell
  •                      O365 Global Administrator Account
  •                      Accepted O365 Domain

Procedure:

  •          Step 2. Create your CSV File with the following values.
  • Connect office365:
  • Run the following command in PowerShell
     $csv = Import-Csv C:\Users\malik\Desktop\emailchange.csv foreach ($line in $csv)
    { $SMTP ="SMTP:"+$line.AliasEmailaddress
    Set-Mailbox -Identity $line.User -EmailAddresses $SMTP -WindowsEmailAddress $line.AliasEmailaddress } 

Last updated on