> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.accessorange.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Change Primary SMTP Address for Bulk O365 Users

Articles on: [Microsoft 365](/en/category/microsoft-365-1bu5kny/)

## Change Primary SMTP Address for Bulk O365 Users

  
  

## Requirements:

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

## **Procedure:**

  
  
*   Step 1. Connect to O365 using PowerShel
  

  
  
*   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 }

Updated on: 31/01/2023