nelsonsa
(Nelson9480)
1
How to export a list of mailbox user names with their mailbox size and item count in decending order.
Step 1: Login to your Exchange 2010 server
Step 2: Run Exchange PowerShell as Administrator
Step 3: Run PowerShell string
Get-MailboxStatistics -Database “Mailbox Database XXXXXXXXXXXXX” | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending | Export-CSV C:\MBSizes.csv
Alter the mailbox database number and the export address as required.
If you found this How-to useful, don’t forget to spice it up!
249 Spice ups
A script I use regularly, and a great example of how Powershell makes things easy to manage in Exchange 2010. Thanks for posting.
I replaced the -Database with -Server to get all mailboxes in my org. Works great! Thanks for putting this here. I searched google for a half hour not finding the correct syntax.
nelsonsa
(Nelson9480)
5
Thanks for the comments guys; it’s one of those things which used to be so easy to find in the GUI of Exchange 2003 but then totally disappeared into PowerShell in 2010. Took me an age to find so I’m happy to share the knowledge!
Wow…microsoft took the one of the most useful things out of exchange and replaced it with a shell command. My god…they are as bad as everyone says.
So instead of simply clicking on a column addition…i know have to spend 5 or 10 minutes researching everyone few months on how to do this. Man…I wish I could meet this guy whose idea this was face to face…
Thanks… so easy with all these explanations. Cool.
Excelente, funciona perfecto, muchas gracias…
molan
(molan)
12
Exactly what I needed Thanks!
This was excellent. Thank you!
Thank you, worked like a charm 
tonygrove
(Tony_Grove)
15
Thanks you loads, this is exactly what I needed. Perfect :o)
Thank you finally I found what I was looking for . perfect
Exactly what I needed. Now it’s time to hunt down the top offenders…Thanks 
Thank you so much you’ve saved me hours of searching for a solution.
Hi, This command is not working for me.
My DB is named “ABCD DB.edb”, meaning there is a gap between ABCD and DB. What do I have to do to make it work. Thanks.
nelsonsa
(Nelson9480)
20
@TTWasim It looks like you’re using the wrong database information. Open Exchange Management Shell and enter “Get-MailboxDatabase” (without the quote marks), this will return a 10 digit number. Use this number in the string I provided in the How To (where I have written XXXXXXXXXX).
Alternatively you could swap “-MailboxDatabase” with “-Server” and enter your server name.