Search shared mailbox permissions for a particular group

Hi,

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

Thanks.
tbslimAsked:
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.
0
 
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?
0
 
tbslimAuthor Commented:
That's it!

Thank you very much.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
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.
0
 
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.
0
 
Jon BrelieSystem ArchitectCommented:
Please mark my answer as the accepted answer to close the question.
0
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.