Exchange 2010 : Mailbox Size Report
The following script will report on all mailbox sizes, from largest to smallest and generate CSV file in the directory from which it is executed.
{code lang:php title:”Mailbox Size Report” lines:false hidden:false}$data = @()
foreach($mbx in Get-MailboxDatabase | Get-Mailbox)
{
$dispname = $mbx.displayName
$data += Get-MailboxStatistics $mbx.identity | select @{n=”Username”;e={$mbx.displayName}},@{e={$_.TotalItemSize.Value.ToMB()};n=”TotalItemsSize(MB)”}
}
$data | sort-object “TotalItemsSize(MB)” –Descending | export-csv MailboxSizes.csv{/code}