Exchange 2010 – Display Mailbox’s by size

KB ID 0000469 Dtd23/06/11

Problem

Yesterday a client asked me how he could find out, which of his users were the "worst offenders" for mailbox size. Normally a simple Get-MailboxStatistics command would be fine, and we would sort the results in descending order.

But this client had multiple mailbox servers and multiple data stores.

Solution

1. On one of the Exchange servers > Start > All Programs > Microsoft Exchange Server 2010 > Exchange Management Shell.

2. Issue the following command:

Note: That's all one command, replace the name DC2A with your exchange server name.

Get-MailboxStatistics -Server DC2A | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (MB)”;expression={$_.TotalItemSize.Value.ToMB()}},@{label=”Items”;expression={$_.ItemCount}},@{label=”Storage Limit”;expression={$_.StorageLimitStatus}} -auto

Mailbox Size

2. And here's your nicely formatted list (Note: this is my test environment so there's not much mail in it).

Mailbox Table

The List is too long!

If you have hundreds of mailbox's you can output the results to a text file by simply adding ">>c:mailbox.txt" to the end of the command, like so:

Get-MailboxStatistics -Server DC2A | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (MB)”;expression={$_.TotalItemSize.Value.ToMB()}},@{label=”Items”;expression={$_.ItemCount}},@{label=”Storage Limit”;expression={$_.StorageLimitStatus}} -auto >>C:mailbox.txt

Mailboxes Exported

Note: To see the sizes of the individual Folders in users mailboxes see the following article;

Exchange - Display/Export Users Mailbox Folder Sizes

Related Articles, References, Credits, or External Links

NA

Author: Migrated

Share This Post On