Reputation: 81
I am trying to see what accounts might have access to another account's mailbox with powershell.
Get-MailboxPermission -Identity <UPN>
will show me, from an individual account, who else has access. I want to be able to see external access, from a single UPN. Results come like this:
| Identity | User | AccessRights |
|:-------------:|:-----------------:|:--------------------------:|
|[email protected]| NT AUTHORITY\SELF |{FullAccess, ReadPermission}|
|[email protected]|[email protected]|{FullAccess} |
but if I look at the Ann's permissions:
| Identity | User | AccessRights |
|:-----------------:|:---------------:|:--------------------------:|
|[email protected]|NT AUTHORITY\SELF|{FullAccess, ReadPermission}|
I would like to be able to get a list of all users Ann has access to, without needing to know what that account is beforehand.
Upvotes: 2
Views: 240
Reputation: 26
As TomG said, you'll have to list all mailboxes and filter to the user you want. I tested this and it's pretty slow, but I'm not aware of a better way.
Example:
Get-EXOMailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Get-MailboxPermission | Where-Object {($_.user -like '*@*')}
Upvotes: 1