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.
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.
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.
2 thoughts on “Quick and Easy Mailbox Size and License Report”
Can i run it for a list of users? lets say i need only for 20users
You can indeed but you’d need to modify the script a bit you allow for an import csv or something similar.