Hi guys i am looking for the easiest way to list of all the mailbox sizes for the users. My reports for spiceworks dont seem to work. I would prefer to do it through command prompt to text file or csv.

Thanks

3 Spice ups

You need to make a slight change for Spiceworks to work properly with Ex2007/2010

See http://community.spiceworks.com/help/Exchange_2007

1 Spice up

just looking at the requirements i dont have exchange server 2007 service pack 2. i am upgrading to exchange 2010 and need the mailbox sizes before i do this.

Have you looked through the scripts on the site here? Three are quite a few.

Well, if you don’t fancy making any changes then you’re in to running Powershell cmdlets manually yourself.

Get-MailboxStatistics | ft DisplayName,TotalItemSize,ItemCount should give you total mailbox size and number of items.

There’s some nice detail in this article - http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/getting-mailbox-statistics-exchange-2007.html

2 Spice ups

Quick and dirty on Exchange in the management shell,

Mailbox size sorted by largest exported to txt file
Get-MailboxDatabase “<insert database name or don’t enter one for all DB’s>” | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount (optional | Select –first 25) >> C:*name_of_file*.txt

-Jay

3 Spice ups

jay do have to put the database name and i seem to get this error when i do it to file

Untitled.jpg

You can, it appears by not entering a name and which the code then goes to check all of them it inadvertently picked a DB you have that is not mounted. So you would either need to mount that DB first or specify a DB.

-Jay

Get-MailboxStatistics -Server <exchange_server_name> | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=“TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount

This worked a bit better for me FWIW.

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount > C:\Temp\MailboxSize.txt

Leave off the last bit if you want it to display on the screen instead of output to a file

C:\Temp\MailboxSize.txt

1 Spice up