List the size of ALL mailboxes in 2013?

Hello,

I LOVED how exchange 2003 had the mailbox sizes as easy as a mouse click in the GUI.

I used a script in PS to list mailbox sizes in sorted order in Exchange 2007 and 2010 using get-mailboxstatistics.

It seems 2013 get-mailboxstatistics is only designed to look at 1 mailbox.

Can someone point to a command or script I can use in 2013 to get a list of all mailboxes on the server or in a database - preferably sorted by size?   (I do not want to have to type the name of each user into a script or on PS to get this info)

Thanks

February 20th, 2013 12:08am

Hi,
As far as I can see, the cmdlet Get-Mailboxstatistics works the same way as in earlier versions.

Here's a few examples you can run:

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

Get-MailboxStatistics -database "DATABASE NAME" | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=TotalItemSize(MB);expression={$_.TotalItemSize.Value.ToMB()}},ItemCount -auto


Get-MailboxStatistics -Server SERVERNAME | Sort-Object TotalItemSize -Descending | ft Displayname,Totalitemsize

Free Windows Admin Tool Kit Click here and download it now
February 20th, 2013 5:12am

Thanks so much!!!

I see thanks to the excellent example you gave that I can also change MB to GB.   Do you know if I can do it in GB but with a decimal place for the next digit.   e.g. mailbox size 4.2 GB instead of mailbox size 4GB

It isn't quite the same as this script below is the one I've been using on all my 2007 and 2010 servers - no need for servername.  Or I could even just type Get-MailboxStatistics.

Get-MailboxStatistics|Sort-ObjectTotalItemSizeDescending|ftDisplayName,@{ expression={$_.TotalItemSize.Value.ToMB()}},ItemCount



February 20th, 2013 5:26am

Hi,
Don't know how you managed to run Get-Mailboxstatistics without specifying an identity, server or database. Your onliner doesn't work for me.

Specifying Get-Mailbox before Get-Mailboxstatistics works though and with that we don't get the System-,Montoring- or Arbitration Mailboxes in the output.

Example:
Get-mailbox | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItem
Size(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount  -auto


I don't think its possible to get something like 4.2GB, but somebody with a little more scripting skills than me might have an idea.
Free Windows Admin Tool Kit Click here and download it now
February 20th, 2013 5:55am

Hello,

Thanks again for your help.   I promise you it does work on many servers - here is an example from a 2007 server - without any identity and here is the script working as well.

February 20th, 2013 6:04am

Hi,
I had to do a test now :)
I noticed that it is possible to run Get-Mailboxstatistics without an identity, server or database in Exchange 2007 but that is not the case in Exchange 2010.



Nice to learn something new :)
Free Windows Admin Tool Kit Click here and download it now
February 20th, 2013 6:12am

I see why the script wouldn't work for you (and me in 2013) - I used the default mailbox name so it works on my other systems.   If you custom name your databases it will not work unless you edit the variable for the database.   Again - yet another reason I despise powershell.   It is so much easier to do EVERYTHING correctly with a gui.  

Please MS - take note.   We'd all be running OSX now if you hadn't move to a GUI OS like Windows.   If command lines were what made the world turn, people would have dumped OSX and Windows for a non GUI version of Linux.

You can pretend all you want that powershell is "Powerful" but what it is, an easy way of getting out of the effort to put things in the GUI for ECP.   2003 in many ways was more powerful than 2013 as you could do things with a mouse click that take inane incantations to perform in 2013.



February 20th, 2013 6:33am

I could not agree with you more. I am all for creating additional utilities like powershell to help out those who manage hundreds of exchange servers. However that does not mean they should take away GUI functionality for admins who only have a handful of exchange servers to manage and the GUI that they pushed us all to worked great for that. Its like they decided only enterprises matter any more and to hell with the SMB market. There was no reason to strip away the functionality as they did. They need to make things easier to manage not harder. I also started in computers back at MsDos 3 so I am comfortable in CLI but we have moved to a GUI world they need to stop stripping down the GUI. 
Free Windows Admin Tool Kit Click here and download it now
June 11th, 2015 9:33am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics