Change Primary SMTP Address for Bulk O365 Users Without Changing Login Email Address - Untold.IT


Post Top Ad

Wednesday, February 13, 2019

Change Primary SMTP Address for Bulk O365 Users Without Changing Login Email Address

In this tutorial we are going to change the primary SMTP Email Address for specific users in O365. This is applicable for businesses with multiple domain in a single tenant.

It is a tested method and everything should work flawlessly if you follow this step by step guide.


  • CSV File
  • Powershell
  • O365 Global Administrator Account
  • Accepted O365 Domain (this can be found in the domains list in your O365 tenant)


Step 2. Create your CSV File with the following values.

Note: In the "User" column, add the display name of the O365 Users. For the "AliasEmailaddress" column, add the email address that will be set to primary SMTP. Also make sure that you are using an Accepted Domain.

Step 3. Run the following command in PowerShell

Note: Replace "C:\Users\%UserProfile%\Desktop\SMTP_ADDRESS.csv" with your filepath.

$csv = Import-Csv C:\Users\%UserProfile%\Desktop\SMTP_ADDRESS.csvforeach ($line in $csv)
$SMTP ="SMTP:"+$line.AliasEmailaddress
Set-Mailbox -Identity $line.User -EmailAddresses $SMTP -WindowsEmailAddress $line.AliasEmailaddress

Step 4. If there are no problems with your CSV file, you will not see any message after the execution of command. You can also verify the User Details in Exchange Admin Center if the Primary SMTP  Server has changed.

Note: The Primary SMTP Address is always displayed in BOLD Text.

Now the users will still use their Default Email Address for login purposes. However, their reply address will now be set to the primary SMTP address we configured. The users can still receive emails from their login address but the outgoing messages will be sent as the Primary SMTP address.


  1. Script is garbage. People always typing a bunch of crap but then typo the commands. Hilarious.

  2. Your writing has some engaging ideas. Sincere thanks for the article. A spacebar clicker can be used to evaluate your spacebar clicking speed. You can use Spacebar Speed Test to determine your spacebar click speed.

  3. useful and well-written blog We appreciate you sharing this article. custom erp developers


Post Top Ad