How can I see all mailboxes that are local on an Exchange 2007 server?

John Savill

June 4, 2007

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. The Get-MailboxStatistics cmdlet lists information about all mailboxes on the given server. For example

Get-MailboxStatistics -Server dalsxc02
[PS] C:Documents and Settingsgageniant>Get-MailboxStatistics -Server dalsxc02
DisplayName ItemCount StorageLimitStatus LastLogonTime
----------- --------- ------------------ -------------
Microsoft System Attendan 0 BelowLimit 5/10/2007 2:58:59 PM
Tim Goodrich 2339 BelowLimit 5/10/2007 1:49:11 PM
Kevin Savill 1 BelowLimit 5/10/2007 10:40:11 AM
Eliott Ford 6681 BelowLimit 5/10/2007 2:06:23 PM
John Schindler 4998 5/10/2007 2:55:29 PM
SystemMailbox{05D04681-EE 402 BelowLimit
A3-47B5-98B0-6BB113E12A8D
}
John Savill 13442 BelowLimit 5/10/2007 2:53:23 PM

You can combine the power of PowerShell to just list the DisplayName and TotalItemSize and sort it by the TotalItemSize. For example,

[PS] C:>Get-MailboxStatistics -Server dalsxc02 | Sort-Object -Property
TotalItemSize | Format-Table DisplayName,TotalItemSize

DisplayName TotalItemSize
----------- -------------
Microsoft System Attendant 0B
Kevin Savill 5437B
SystemMailbox{05D04681-EEA3-47B5-98B... 369231B
Tim Goodrich 86424484B
Eliott Ford 248594052B
John Savill 590513286B

You could add -Descending to the Sort-Object, if required, For example,

Sort-Object -Property TotalItemSize -Descending

You can add other standard PowerShell logic. For example, you can list mailboxes above a certain size using the Where statement with the TotalItemSize attribute of each object $_.TotalItemSize:

Get-MailboxStatistics -Server dalsxc02 | Where {$_.TotalItemSize -gt 100MB} | Sort-Object -Property TotalItemSize -Descending | Format-Table
DisplayName,TotalItemSize

DisplayName TotalItemSize
----------- -------------
John Savill 590666145B
Eliott Ford 248746911B

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like