Office 365 (Exchange Online) Archive Mailbox Size Reporting with PowerShell

Here are some quick PowerShell commands to report on the size of the Office 365 (Exchange Online) Archive Mailbox size.

Microsoft has this information published in the following KB: https://msdn.microsoft.com/en-us/library/gg576861(v=exchsrvcs.149).aspx

Open a connection to Exchange Online with PowerShell.

The command below will get the display name, total archive size and total item count for a specified user:

Get-MailboxStatistics <Identity> -Archive | Format-List DisplayName,TotalItemSize,ItemCount

The command below will get the get the display name, total archive size and total item count for all users and then out put the results to a CSV:

Get-Mailbox -Archive -ResultSize Unlimited | Get-MailboxStatistics -Archive | Select DisplayName,@{name=“TotalItemSize (MB)”;expression={[math]::Round((($_.TotalItemSize.Value.ToString()).Split(“(“)[1].Split(” “)[0].Replace(“,”,“”)/1MB),2)}},ItemCount | Sort “TotalItemSize (MB)” -Descending | Export-Csv “C:\Path\FileName.csv” -NoTypeInformation