Cloud

Weekly Exchange PowerShell Tip: Mailbox Sizes

​To get a formatted List with Mailbox Size in Megabytes (MB) to CSV File:
 
Get-Mailbox | Get-MailboxStatistics | Select-Object DisplayName,{$_.TotalItemSize.Value.ToMB()} | export-csv -path C:\<FILENAME>.csv

To get the Archive Size:
Get-Mailbox | Get-MailboxStatistics -Archive | Select-Object DisplayName,{$_.TotalItemSize.Value.ToMB()},Database | export-csv -path C:\<FILENAME>.csv

Alternatively you can specify the MBD also:

Get-MailboxDatabase -Identity "MB01 (FFB)" | Get-Mailbox | Get-MailboxStatistics | Select-Object DisplayName,{$_.TotalItemSize.Value.ToMB()} | export-csv -path C:\Temp\MailboxSize.csv
If you want the results output to the screen instead of a CSV:
Get-Mailbox | Get-MailboxStatistics | Format-Table DisplayName,{$_.TotalItemSize.Value.ToMB()} -auto

Leave a Reply

x

We use cookies to ensure the best possible experience on our website. Detailed information on the use of cookies on this site is provided in our Privacy and Cookie Policy. Further instruction on how to disable our cookies can be found there.