Seite wählen

I don’t know why, but currently the Exchange Control Panel of Office365 doesn’t work correctly, but I needed to configure SendAs permissions on a distribution group. However, PowerShell is a good fallback when it comes to configure O365.

When you want to connect to O365 PowerShell you need a user that has Administrator permissions and that is not configured for multifactor authentication.

The Technet article Connect to Exchange Online PowerShell explains how to connect:

Set-ExecutionPolicy RemoteSigned

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

When using Get-Credential make sure you are using a user with administrator rights and multifactor auth turned off!

After importing the session you can configure the distribution group using:

$DistributionGroup = ""

$Trustee = ""

Get-DistributionGroup $DistributionGroup | Add-RecipientPermission -AccessRights SendAs -Trustee $Trustee