Change the smtp address of a Microsoft 365 Group

Print Friendly

In order to create a remote powershell session to 365, open Windows Powershell and run below commands:

$UserCredential = Get-Credential

and enter your 365 credentials when prompted.
Then type:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking

To add required smtp address:

Set-UnifiedGroup -Identity "Group Name" -EmailAddresses: @{Add ="GroupName@domain.com"}

To promote as a primary smtp address:

Set-UnifiedGroup -Identity "Group Name" -PrimarySmtpAddress "GroupName@domain.com"

To remove the old address from the group:

Set-UnifiedGroup -Identity "Group Name" -EmailAddresses: @{Remove="OldGroupName@domain.com"

To end your Exchange Online Powershell session:

Remove-PSSession $Session
This entry was posted in Windows. Bookmark the permalink.

Leave a Reply

Your email address will not be published.