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.


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]

Discover more from TechyGeeksHome

Subscribe to get the latest posts to your email.

Avatar for Andrew Armstrong

Andrew Armstrong

Founder of TechyGeeksHome and Head Editor for over 15 years! IT expert in multiple areas for over 26 years. Sharing experience and knowledge whenever possible! Making IT Happen.

Leave us a message...

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