Script To Export All Mailbox Sizes To CSV Using PowerShell On Office 365

This PowerShell script will connect to Office 365 and export all mailbox sizes to a CSV file. A lot of people suggest we just run the following command:


This is a pretty simple command, which will do the job, but our script offers you much more control – and as we love writing scripts we wanted to share it with you.