Exchange Shell – All Permissions on all Mailboxes

Exchange-Export-all-permissions-on-all-mailboxes

Last updated on March 30th, 2023 at 05:10 pm

Read Time:1 Minute, 31 Second

We carried out a project recently which was to migrate around 150 mailboxes to the Office 365 (Exchange Online) platform.

Part of scope of works that was required was to provide the team leaders within the business a list of all the mailboxes and what permissions they had on them.

This was mostly a housekeeping exercise due to years of neglect in that area. As an example, one users mailbox had permissions on it for a colleague to be able to access their inbox whilst they were on annual leave – but was still set on it two and a half years later!

So we turned to Exchange Shell again…

The gift that just keeps giving, PowerShell, or for Exchange, Exchange Shell, was the perfect tool for this job. One simple command and we could output all this information to a CSV file.

Get-Mailbox | Get-MailboxPermission | Select {$_.AccessRights}, Deny, InheritanceType, User, Identity, IsInherited, IsValid | Export-Csv c:\TGH\mbx_permissions.csv

You can amend the above command if you wish to bring in, or remove, any columns of data.

We would then take this CSV file, turn it into a XLSX file and send it to the people that wanted it. If we really wanted to, we could put this into a PowerBI report and create pretty graphs etc – but for this job, an Excel file would do!

The people requesting this information were delighted and a bit shocked that it only took a few minutes to provide to them – but that’s the value of PowerShell.

Feedback

If you run into any problems with this, or if you would like some assist expanding the data column information, please feel free to leave us a message below in our comments section and we will get back to you as soon as we can.

Click to rate this post!
[Total: 0 Average: 0]

Free Subscription

If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.

Join 441 other subscribers.

No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.


Leave us a message...

This site uses Akismet to reduce spam. Learn how your comment data is processed.