Change/Add Office 365 Group Email using Office 365 PowerShell

$Creds = Get-Credential -Message “Please enter Office 365 Global Admin Credentials”
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Creds -Authentication Basic -AllowRedirection
Import-PSSession $Session

$AllGroups = Get-UnifiedGroup -Filter *

#Getting first group just for checking. 
$FirstGroup = Get-UnifiedGroup -Identity $AllGroups[0].Id

#Syntax

#{Add=”<Type>:<emailaddress1>”,”<Type>:<emailaddress2>”,…; Remove=”<Type>:<emailaddress2>”,”<Type>:<emailaddress2>”}.

$EmailAdded = @{Add=”smtp:bigwigstest@sharepointmvp.onmicrosoft.com”}
Set-UnifiedGroup -Identity $FirstGroup.Id -EmailAddresses $EmailAdded -Verbose

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s