display all mailboxes by size

Posted on 2013-11-29
Last Modified: 2013-12-03
I am looking for a powershell command that will display all mailboxes in all servers databases and sort them by size, from the larger size to smaller size.

I know that this can be done by dumping the output to Excel file then using Excel to sort them put.

I wonder if there is powershell combination command that can achieve the same thing.

Thank you
Question by:jskfan
LVL 13

Assisted Solution

duncanb7 earned 50 total points
ID: 39686398
Did you read those related articles before  that might help on your issue ?

Hope understand your question completely, if not please point it out

LVL 57

Assisted Solution

by:Pete Long
Pete Long earned 50 total points
ID: 39686782
LVL 53

Expert Comment

by:Will Szymkowski
ID: 39688058
Use the following command below to accomplish this...

get-mailbox -ResultSize "unlimited" | Get-MailboxStatistics | sort -Property TotalItemSize | se
lect Displayname, TotalItemSize, TotalDeletedItemSize

Open in new window

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.


Author Comment

ID: 39691401
get-mailbox -ResultSize "unlimited" | Get-MailboxStatistics | sort -Property TotalItemSize | se
lect Displayname, TotalItemSize, TotalDeletedItemSize

This there a switch to add to dump the output into a text file ?

Thank you
LVL 53

Accepted Solution

Will Szymkowski earned 400 total points
ID: 39691404
Yes... Use the following command below...

get-mailbox -ResultSize "unlimited" | Get-MailboxStatistics | sort -Property TotalItemSize | se
lect Displayname, TotalItemSize, TotalDeletedItemSize | out-file "c:\mailboxstats.txt"


Author Closing Comment

ID: 39693612
Thank you

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question