Quick and Easy Mailbox Size and License Report

When reporting on mailboxes in Exchange Online, we don’t get a view of the license assignment. This can be valuable information where organizations are running a mixture of Exchange Online SKUs with different mailbox allowances and Archive support. I’ve put together a very quick and easy script to report on mailbox sizes and assigned licenses and export the results to an easy to read CSV file.

Running the Script

Running the script is very easy, simply download it to your machine, ensure you have both the MSOnline and ExchangeOnlineManagement PowerShell Modules installed and run the script in PowerShell. To install the two required modules you can use the below commands:

Install-Module ExchangeOnlineManagement
Install-Module MSOnline

With the modules installed, navigate to the path you downloaded the script to and run it as in Figure 1.

Figure 1: Running the Script in PowerShell

The script will prompt you to log in to Exchange Online / Office 365 as an admin twice and then output a CSV file to your current directory with the Mailbox Addresses, User Principal Names, Mailbox Sizes and Assigned Licenses. Check Figure 2 below for a sample output screenshot.

Figure 2: Sample CSV Output

Summary and Download Link

The script is available on GitHub at this link. As always, please read and understand any code before running it in your production environment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s