17.17. Viewing Mailbox Sizes and Message Counts
You want to view the sizes and message counts of all mailboxes on a server.
Using a graphical user interface
Open the Exchange System Manager (ESM) snap-in.
In the left pane, browse to the mailboxes container of the server, storage group, and database where you want to view mailboxes.
In the right pane, scroll down through the list of mailboxes, noting the Size and Total Items columns.
' This code displays all mailboxes and their sizes ' ------ SCRIPT CONFIGURATION ------ strComputer = "
<Exchange Server>" 'e.g., ExchServer2 ' ------ END CONFIGURATION --------- set objWMI = GetObject("winmgmts:\\" & strComputer & _ "\root\MicrosoftExchangeV2") set objMbxs = objWMI.ExecQuery("Select * from Exchange_Mailbox",,48) for each objMbx in objMbxs Wscript.Echo objMbx.MailBoxDisplayName & " " & objMbx.size & "KB " _ & objMbx.TotalItems & " items" Next Wscript.Echo "Script completed successfully."
Mailbox sizes and message counts are items on Exchange systems that administrators routinely want to know about for the purposes of reporting and metrics. Administrators want to know if their mail system is balanced and if users are spread across the mailbox stores evenly. Knowing the number of users and the size of their mailboxes in each mailbox store, the administrator can make better decisions about where new user mailboxes should be placed or if some leveling of mailboxes is required.
Viewing mailbox details ...