Search shared mailbox permissions for a particular group


Please help. I am looking for a powershell command that will list all the shared mailboxes a particular security group has access to.

Who is Participating?
Jon BrelieConnect With a Mentor System ArchitectCommented:
Essentially, you're looking at doing the following:

foreach ($mb in (Get-mailbox) {if (get-mailboxpermission $mb -user DOMAIN\GROUP){write-host DOMAIN\GROUP has access to $mb}}

Open in new window

output would look like:

DOMAIN\GROUP has access to John Doe
DOMAIN\GROUP has access to Bill Gates
DOMAIN\GROUP has access to Another Mailbox

The line above is going to return a TRUE for any mailbox that has DOMAIN\GROUP listed in it's mailbox permissions.

There are a number of ways you can scale down the number of mailboxes you operate on, and also a lot that you can do with the output.
Jon BrelieSystem ArchitectCommented:
This would be a setting on a mailbox, so you're going to have to loop through all of your mailboxes.

Now, if you're really only concerned about mailboxes of type "Shared Mailbox" then you can scale that down significantly.  This will only work if you really mean "mailboxes of type: Shared" and not just 'user mailboxes that have been shared."  There is a difference.

Is that what you're trying to do?
tbslimAuthor Commented:
That's it!

Thank you very much.
Easily manage email signatures in Office 365

Managing email signatures in Office 365 can be a challenging task if you don't have the right tool. CodeTwo Email Signatures for Office 365 will help you implement a unified email signature look, no matter what email client is used by users. Test it for free!

tbslimAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for tbslim's comment #a39973677

for the following reason:

Works perfectly.
tbslimAuthor Commented:
Yes. They are only interested in actual shared mailboxes since they keep a tight lid on granting groups to regular user's mailboxes.
Jon BrelieSystem ArchitectCommented:
Please mark my answer as the accepted answer to close the question.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.