I needed a way of listing access rights for users on shared mailboxes.

Google helped me out along with a little playing.

So I now have two PowerShell lines. One that lists users with full access to a mailbox, the other shows all users with the send as role.

Full Access

get-mailbox | %{$foo = $_; Get-MailboxPermission $foo | ?{$_.AccessRights -eq "FullAccess" -and $_.IsInherited -eq $false}} | ft {$foo},User,AccessRights

Send-As:

get-mailbox | %{$mailbox = $_; Get-ADPermission $mailbox.DistinguishedName | ?{$_.ExtendedRights -like "Send-As" -and $_.User -notlike "NT AUTHORITYSELF"}} | ft {$mailbox},user,{"Send-As"}

 

Run each of these to output the list of users.
Copy and save the info to a CVS file, then import into Excel by using “Fixed Width” Insert a line between each user, then it makes a nice easy report for managers to see.

« »