How to display Mailbox Sizes in Exchange 2007

Hi Guys,

A client of mine approached me today with a question – “how can I check the sizes of the mailbox on my server”.
Now, in Exchnage 2003 it was a pretty strait forward task, as we could all see by simply viewing our Mailbox DB in the Exchange System Management.
In Exchange 2007 however it is not that strait forward, although its not that hard.
We can go to EMC and check the size of some particular mailbox, but what if we want to get the sizes for all the mailbox on one server?
For that we go to PowerShell!
So here is the deal, open up PowerShell.
There is a cool command called Get-MailboxStatistics.
This command allows us to get useful information about a mailbox including stuff like size, Item count and etc…
For instance try running that command like :
Get-MailboxStatistics USERNAME | fl
This will give all the mailbox statistics for the user name you give it.
Now, in order to display the size of the mailbox, we will use the command like that Get-MailboxStatistics USERNAME | fl totalitemsize.
This will give us the size of the mailbox (in KB) for that user name.
You can also run the command without the USERNAME and it will run on all the mailboxes on the server you are running the command.
You can also run the command with a different syntax, which will arrange the output for you in a table, display the sizes in MB and sort the outcome in a decending order, for that run the following command:
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName, @{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount
In this command we do 3 things:
1. Getting mailbox statistics for all users.
2. Ordering the output by the size of the mailbox, and displaying it in decending output.
3. Changing the size being displayed to MB.

now, if we would care for some GUI easy scripts, glen has made a great job with his Mailbox Size script ! check out this phenomenal work :
More fun with combining mutliple Powershell cmdlets to produce reports
Version 5 of the Mailbox Size Gui Script for Exchange 2007

this should work for all the required more “easy” more info fast 🙂

What do you think about this post?