Retrieving a list of Mailbox Sizes in Exchange 2007

March 10, 2009 11:17 by dana

Prior to Exchange 2007, one of the commonly used features was the ability to view a list of all mailboxes along with their size and the number of items in the mailbox. This functionality has been removed from the Management Console in Exchange 2007. Not to fear, though, all is not lost. The following command shell script can be used to retrieve a list of all mailboxes on a server along with the mailbox size and the number of items.

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

Replace <server name> with the name of the Exchange 2007 server to query.