Change Office 365 Group Email Address using PowerShell

Requirement: Change Office 365 Group Email using PowerShell

How to Change Office 365 Group Email Address?
If you want to change the Email address of a Office 365 group, its not possible through Office 365 admin center!
office 365 group change email address powershell

But we can change Office 365 group Email using PowerShell

Office 365 Group: Change Email Address using PowerShell
Lets change the Email of an Office 365 group: External Vendors Group to "[email protected]"
#Get Credentials to connect
$Credential = Get-Credential
#Create the session
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri `
           -Credential $Credential -Authentication Basic -AllowRedirection
#Import the session
Import-PSSession $Session -DisableNameChecking

#office 365 powershell change group email address 
Set-UnifiedGroup -Identity "External Vendors Group" -PrimarySmtpAddress "[email protected]"

#Remove the session
Remove-PSSession $Session

PowerShell to Add Email Address to Office 365 Group:
Set-UnifiedGroup -Identity "External Vendors Group" -EmailAddresses @{Add="[email protected]"}

Remove Email Address from Office 365 Group using PowerShell
Set-UnifiedGroup -Identity "External Vendors Group" -EmailAddresses @{Remove="[email protected]"} 

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.