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.

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: