Exchange 2003 Administrators are used to using the old Exchange Console to view the size of the mailboxes in your Exchange organization. The Exchange 2007 EMC unfortunately doesn’t have this feature anymore. Here’s a little PowerShell script that will translate the output of the Get-MailboxStatistics command from Bytes to MB or GB.
For a single user:
Get-MailboxStatistics <USERNAME> | select-object DisplayName, {$_.TotalItemSize.Value.ToMB()}
Get-MailboxStatistics <USERNAME> | select-object DisplayName, {$_.TotalItemSize.Value.ToGB()}
Get-MailboxStatistics <USERNAME> | select-object DisplayName, {$_.TotalItemSize/1.0MB}
Get-MailboxStatistics <USERNAME> | select-object DisplayName, {$_.TotalItemSize/1.0GB}
To get the script to work for all users just add the “Get-Mailbox” command.
For all users:
Get-Mailbox | Get-MailboxStatistics | select-object DisplayName, {$_.TotalItemSize.Value.ToMB()}
To export to a csv:
Get-Mailbox | Get-MailboxStatistics | select-object DisplayName, {$_.TotalItemSize.Value.ToMB()} | export-csv -path "c:\path\filename.csv"
With a little ingenuity you can really get creative on your output. For example, you could alter the Get-Mailbox command to limit your results to Mailbox Store or Server. How far will you go?

{ 8 comments… read them below or add one }
How can I know the storage limit for each user?
You'll need to use the get-mailbox command.
Get-Mailbox user | select Name,*Quota | ft
This would give you a nice layout on the screen. If you wanted to export to a csv just pipe the command to export-csv as shown above.
To covert to MB you'll need to replace *Quota with the actual fields:
{$_.ProhibitSendQuota.Value.ToMB()}
{$_.ProhibitSendReceiveQuota.Value.ToMB()}
{$_.IssueWarningQuota.Value.ToMB()}
Your export to csv command for mailboxstatistics worked great. I spent a lot of time on this before visiting your site. I am glad I discovered your site
hi,
how to export all users mailbox to a html report?
thanks
david
Hi,
This site is very helpful.
Thanks,
Allan
Hi,
Can someone tell me if there’s an article about transaction logs not purging automatically.
I got this problem with my new employer, they have 28 storage groups with 1 db on each SG.
Only two SGs have no problem with their transaction logs, the rest are all problematic.
Transaction logs are piling on each SG folders except for the two SGs.
Hope you can help me on this.
Thanks and regards,
Allan
I can only think of two items: 1) The Databases are not being backed up or the backup is not truncating the logs as it should. 2) Circular Logging is not enabled. This is not recommended as you will not be able to preform incremental restores/backups. I would try addressing your question to the MS Forums at http://social.technet.microsoft.com as you’ll get a much wider audience than you will here.
Hello,
this is a very helpfull command, and also website!! Congrats!!
I would like somebody help me:
i mean, i would like to combine the results of get-mailboxstatistics with TotalItemSize.Value to MB, and get-mailbox with name, Issue warningquotas,MaxSendSize, MaxReceiveSend. Sorting the results by name, and export to csv file
I´ve been trying some posibilities but not reach to sucesful results.
My commands :
Get-Mailbox -resultsize unlimited | select Alias, Name, database, IssueWarningQuota, MaxSendSize, MaxReceiveSend
Get-Mailbox | Get-MailboxStatistics | select-object DisplayName, {$_.TotalItemSize.Value.ToMB()}
Could you please help me?
Thanks in advance