Tuesday, June 30, 2009

How to view mailbox size in Exchange 2007

Use the following script in PowerShell:

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount

This script will list all mailboxes starting with the largest then descending down the page. It will also give you number of items in each mailbox and list size in MB.

You can adjust the Size metric given by changing {$_.TotalItemSize.Value.ToMB()} to either {$_.TotalItemSize.Value.ToKB()} or if you are unlucky {$_.TotalItemSize.Value.ToGB()}. Also if you would like to change the listing at the top of the report make a similar change to the "TotalItemSize(MB)" expression.

Also take a look at this posts:

No comments:

Post a Comment