Exchange Shell – All Permissions on all Mailboxes


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 PowerShell again…

The gift that just keeps giving, PowerShell, 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.

Free Subscription!Subscribe to our site to receive updates via email!

Enter your email address below and click the Subscribe button to receive email notifications about new and exciting downloads available through our website at

You will also receive notifications about new technical guides, latest news and MSI installer downloads that are available through our blog here at 

We will not spam you and we will not pass on any of your details to anyone else. We tend to post new content once or twice a week.

Join 232 other subscribers

You can unsubscribe any time you like.

About A.J. Armstrong

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

View all posts by A.J. Armstrong