Forum Discussion
David Kamp
May 07, 2018Brass Contributor
Mailbox Delegation question
Hi I have a PowerShell question. We have a need to verify that all mailboxes have a special service account listed as Full Access Delegate. Can someone suggest a PowerShell command that will list...
mderooij
May 07, 2018MVP
All roads lead to Rome, but you want to check the set of permissions per mailbox, not the whole population. Then you can filter if that set contains a FullAccess for specified user. If there are results, the delegation exists, if not then not. Also, you might want to leave the inherited permissions out, resulting in something like (for readability, I didn't turn it into a one-liner :) ):
$account= 'special.svc@mydomain.org'
Get-Mailbox -ResultSize Unlimited | ForEach-Object {
$Object = [PSCustomObject]@{
Name= $_.Identity
DelegationFound= [bool]( Get-MailboxPermission $_.Identity -User $account | Where {$_.AccessRights -contains 'FullAccess' -and -not $_.IsInherited})
}
Write-Output $Object
}
Avishek Jana
Sep 25, 2019Copper Contributor
is there any script from where i can provide input as a same account name or email address then script will give me output in csv format and gives you the details of all shared/linked/user mailbox delegation.Please not script should have a option where i can specify the domain name like