Home > Exchange, Exchange 2007, Exchange 2010, Microsoft, PowerShell, Scripts > PowerShell command to get top 10 Mailboxes sorted by Size

PowerShell command to get top 10 Mailboxes sorted by Size


Use the following script to get your top 10 “offenders” in terms of Mailbox size.

 

Get-Mailbox -database DB2 -ResultSize Unlimited| Get-MailboxStatistics | Sort-Object TotalItemSize -descending |Select-Object DisplayName,ItemCount,@{name="MailboxSize";exp={$_.totalitemsize}} -first 10

 

Change the database to reflect the database required, or remove “-database DB2” completely to get a result against all mailboxes.

 

Disclaimer : This has been tested against 2010, however the same command should work for 2007. If it doesn’t drop me a line and I’ll re-write.

  1. No comments yet.
  1. No trackbacks yet.

Leave a comment