List top hundred largest user mailboxes

Here is a quick tip for you. This cmdlet generates the hundred largest user mailboxes sorted by size.

$result = Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited | Get-MailboxStatistics

$result | Select-object DisplayName,@{label=Total Size (MB);expression={[math]::Round(($_.TotalItemSize.value.ToString().Split(()[1].Split( )[0].Replace(,,””)/1MB),2)}} | Sort-Object "Total Size (MB)" -Descending | Select-Object -First 100
List top hundred largest user mailboxes
Example output

Posted

in

by

Comments

Leave a Reply