Viewing Mailbox Sizes and Message Counts

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.

Using a graphical user interface

  1. Open the Exchange System Manager (ESM) snap-in.
  2. In the left pane, browse to the mailboxes container of the server, storage group, and database where you want to view mailboxes.
  3. In the right pane, scroll down through the list of mailboxes, noting the Size and Total Items columns.

Using VBScript

' This code displays all mailboxes and their sizes
strComputer = "<Exchange Server>" 'e.g., ExchServer2
' ------ END CONFIGURATION ---------

set objWMI = GetObject("winmgmts:\\" & strComputer & _
set objMbxs = objWMI.ExecQuery("Select * from Exchange_Mailbox",,48)
for each objMbx in objMbxs
  Wscript.Echo objMbx.MailBoxDisplayName & " " & objMbx.size & "KB  " _
               & objMbx.TotalItems & " items"
Wscript.Echo "Script completed successfully."