Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://ExServer123.com/PowerShell/ -Authentication Kerberos;
- Import-PSSession $Session -AllowClobber;
- Get-MailPublicFolder -ResultSize Unlimited | Get-ADPermission | Where-Object {
- ($_.ExtendedRights -Like "Send-As") -and ($_.IsInherited -eq $False) -and -not ($_.User -like "*S-1-5-21-*")} |
- Select Identity,User;
- Get-MailPublicFolder |
- Select Alias,PrimarySmtpAddress,@{N="GrantSendOnBehalfTo";E={$_.GrantSendOnBehalfTo -join "|"}
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement