Export Shared Mailbox Permissions: Building a CSV Report

Sometimes as IT professionals, we get asked to supply a lot of data to company bosses. This can be extremely frustrating especially when what you want to do is fix stuff, but IT is becoming more and more like an admin role all the time. It doesn’t mean you stop fixing stuff, it just means […]

Exchange Shell Export All Shared Mailbox Permissions To CSV
Sometimes as IT professionals, we get asked to supply a lot of data to company bosses. This can be extremely frustrating especially when what you want to do is fix stuff, but IT is becoming more and more like an admin role all the time. It doesn’t mean you stop fixing stuff, it just means you have to carry out an admin role as well! So, to try and make our lives easy, we need to use the tools available to us as well as our technical skills. Our blog is absolutely packed full of user guides for a whole range of different technical areas, but over the next few weeks, our posts are going to largely evolve around PowerShell scripts and how we can use them to make our lives easier.

Microsoft Exchange

Although email is rapidly moving aware from on premise Microsoft Exchange servers and into the cloud, there are still a hell of a lot of business still using older versions of Exchange. In this scenerio, a project manager has asked to be supplied with all Exchange shared mailboxes and who has what permissions to each one. To carry this out, we can use the Exchange Management Shell (EMS) to input a basic script which will output this information to CSV which then in turn can be passed on to the project manager.

EMS Script

Enter the below script into EMS and this will export the results into a .csv file:
Get-Mailbox -RecipientTypeDetails SharedMailbox | Get-MailboxPermission | Select Identity,User,@{Name='Access Rights';Expression={[string]::join(', ', $_.AccessRights)}} | Export-Csv C:\sharedmailboxpermission.csv -NoTypeInformation

Update (September 2026): the one-liner above was previously sitting in a plain blockquote, which meant WordPress was converting the straight quotes into curly smart quotes when the page rendered, so copying and pasting it straight from the site would break in PowerShell. It’s now in a code block, which is not affected by that, and the missing hyphen on -NoTypeInformation has also been fixed, it was showing as a colon.

where:

  • C:\sharedmailboxpermission.csv = CSV save location and file name (don’t actually save to the root of your C: drive – that is stupid and usually throws a permissions error!)
Once the script has completed going through the Exchange databases, it will out the CSV to the location that you specified in the script.

Exchange Online Equivalent

If your shared mailboxes live in Exchange Online rather than on premise Exchange, connect with Connect-ExchangeOnline first, then use the Get-EXOMailbox and Get-EXOMailboxPermission cmdlets instead:

Get-EXOMailbox -RecipientTypeDetails SharedMailbox | Get-EXOMailboxPermission | Select Identity,User,@{Name='Access Rights';Expression={[string]::join(', ', $_.AccessRights)}} | Export-Csv C:\sharedmailboxpermission.csv -NoTypeInformation

These are the REST based cmdlets from the Exchange Online PowerShell module and return the same Identity, User and AccessRights properties as the on premise cmdlets, so the rest of the script above works unchanged.

What more can make my life easier?

Well, we have a number of Powershell scripts available our PowerShell script collection which might help you out. Otherwise, just that a browse around our site and see what you can find. In the top right is a search function too.

Feedback

If you have any questions or feedback on this guide, please feel free to leave us a message below in our comments section and we will try and get back to you as soon as we can.
🛠️

Gear We Recommend

A few general tech accessories worth having alongside this.

Browse our General Tech Accessories picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems,

Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.