Skip to content

Instantly share code, notes, and snippets.

@norman-bauer
Last active April 13, 2018 07:21
Show Gist options
  • Save norman-bauer/7f93eb17c9007db84cc21fdeb5daecbb to your computer and use it in GitHub Desktop.
Save norman-bauer/7f93eb17c9007db84cc21fdeb5daecbb to your computer and use it in GitHub Desktop.
Configure SendAs Permissions on an Office365 Distribution Group using PowerShell
Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
$DistributionGroup = "somerandomdistributiongroup@normanbauer.com"
$Trustee = "somerandomuser@normanbauer.com"
Get-DistributionGroup $DistributionGroup | Add-RecipientPermission -AccessRights SendAs -Trustee $Trustee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment