KB ID 0000469
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.
Solution
On one of the Exchange servers, launch the Exchange Management Shell.
Issue the following command:
Note: That’s all one command, replace the name PNL-MAIL-2019 with your Exchange server name.
[box]
Get-MailboxStatistics -Server PNL-MAIL-2019 | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending
[/box]
And here’s your nicely formatted list (Note: this is my test environment so there’s not much mail in it).
Fo Exchange 2010 use the following syntax;
[box]
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
[/box]
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