Last active
April 13, 2018 07:21
-
-
Save norman-bauer/7f93eb17c9007db84cc21fdeb5daecbb to your computer and use it in GitHub Desktop.
Configure SendAs Permissions on an Office365 Distribution Group using PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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