skip to Main Content

Export mailbox permissions to CSV file

We like to export mailbox permissions to CSV file in Exchange Server. That’s because the company is merging with another company and they asked us to check every mailbox permission. These are the mailboxes and the shared mailboxes permissions. We can log into the Exchange Admin Center and open every mailbox and write down the permissions of the users. That will take time. What if we can use a powerful script that can do the work for us? In this article, you will learn how to export mailbox permissions to CSV file.

Export mailbox permissions PowerShell script

The script will scan the mailbox databases and check the mailboxes one by one. It will dump everything that it is doing to a text file and export the permissions to the CSV file. The progress can take time, as it depends on the Exchange organization size. In my example, the script took 89 seconds to run. It did scan 38 items in total.

The script will check the permissions on the following:

  • Mailboxes
  • Distribution Groups
  • Resource Mailboxes
  • Shared Mailboxes

The script will export the following Exchange Mailbox permissions to CSV file:

  • Send As
  • Full Access
  • Send On Behalf

The exported CSV file will contain the following information for each mailbox permissions:

  • Display Name
  • Primary SMTP Address
  • Full Access permissions
  • Send As permissions
  • Send On Behalf permissions

Now that we have looked at what the script can do, our next step is to download and set it up. After that, we are going to run the script and check the exported results.

Prepare the export Exchange mailbox permissions script

Download the following PowerShell script from here (direct link) or here (Microsoft). If it does not give you a prompt to save the file, right-click on Export-MailboxFASAPermissions.ps1 and click save link as. You should be able to save the script. Place the script in the C:\scripts folder. Create a scripts folder if you don’t have one.

Export mailbox permissions to CSV file scripts folder

Export mailbox permissions to CSV file

Log in to the Exchange Server and run Exchange Management Shell as administrator. The default cmdlet is going to export the permissions of all mailboxes. These are the Mailboxes, Distribution Groups, Resource Mailboxes, and Shared Mailboxes.

Export mailbox permissions to CSV file EAC mailboxes

Change the path to the scripts directory and run the script.

After the script finishes, the CSV file will show up.

Export mailbox permissions to CSV file output text

Verify the permissions in CSV file

The script will create two files after exporting the permissions. Find the exported CSV file.

Open the CSV file with your favorite program. I used Microsoft Excel. We can see the mailbox permissions in an easy view.

Export mailbox permissions to CSV file scripts folder CSV file

Export mailbox permissions of selected user or users

What if we like to export mailbox permissions for a single user or multiple users? If we run the above cmdlet, it will search the whole organization and that will take time. I talked to the author of the script and he was helpful to update the script. He did come up with a new -MailboxList parameter. We are going to make use of that parameter and add the name of the user that we want to export the permissions from.

If we like to export permissions of more than one user, we need to add the users with a comma-separated.

Export shared mailbox permissions to CSV file

In the first part, we have seen how to export the permissions of all the mailboxes. In the second part, we did export the permissions of a single user or specified users. It’s possible to only export the shared mailboxes permissions.

Export mailbox permissions to CSV file EAC shared

Let’s make use of the -SharedMailboxes parameter.

Export resources mailbox permissions to CSV file

What if we only want to export the resources mailboxes permissions?

Export mailbox permissions to CSV file EAC resources

We can make use of the -ResourceMailboxes parameter.

Export distribution group permissions to CSV file

As of last, we like to export the distribution group permissions to CSV file.

We can use the -DistributionGroupsOnly parameter.

Now that you know how to export mailbox permissions to CSV file, will you be using the script? The original article of the script can be seen over here.

Conclusion

In this article, you learned how to export mailbox permissions to CSV file. It’s a great script and I recommend you to use it if you need an export. The next time that you want to audit an Exchange organization, don’t forget to check the permissions with the script. Did you enjoy this article? You may also like to read Install Cumulative Update Exchange 2016. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top