Powershell Script to Find The Largest Mailbox in Exchange Server

Tej Pratap Shukla | Modified: October 20, 2016 | Exchange Server, General Info | 4 Minutes Reading

In Present Scenario we will discuss ‘How to Find The Largest Mailbox in Exchange Server’, each Exchange server information are stored in its primary repository i.e. mailbox database. Exchange Server is the most crucial part of an application. It finds the largest mailbox in Exchange Server according to file size. The result is, Microsoft Exchange exchange 2010 find large messages. It can be due to any Exchange Server issue. Therefore, users are not able to access the mailbox data due to finding the largest files in Exchange Server. Thus, we have discussed Powershell script which helps to generate a simple report in an easy way while a user tries to check the files in Mailbox. Now the question arises are what are the reasons of Exchange Server mailbox size become largest and How to free up space in Exchange mailbox? In the following section, we will also discuss the techniques to find the largest mailbox in Exchange server 2013, 2010.

How to Find the Largest Mailbox?

A user wants to find the largest mailbox in exchange server. Thus, they now want to know about Simplified Power-shell script which helps to search the largest files in Mailbox. Even if the user trying to access Outlook. Sometimes, it will not be responding properly.

Learning about Powershell Script

The most basic command used on Exchange mailbox is Get-mailbox Statistics. It helps to return an object which includes multiple properties which describe the mailbox statistics for Exchange mailboxes. For example:
Get-MailboxStatistics - Find The Largest Files in Exchange Mailboxes

This following script gives us information including the name of a mailbox, the number of items and mailbox storage limit and its duration for each mailbox on a local server by default.
Now, we have to use format-table command with mailbox size and to create the Output in tabular form. It will make easy for users to search the files according to their specific mailbox size. It will helpful to read the Exchange mailbox accurately.
 Find The Largest Files in Exchange Mailboxes

What Are The Causes Behind Mailbox Size too Large?

There can be various reasons that can prevent the Exchange Server mailbox size limit from being over-sized. The main cause of Exchange Server mailbox are:
#1 The major reason will be Exchange migration process if users focus Exchange server has largest message size than the previous one. It is possible to modify these limits.
#2 Also, in a case of Exchange online the message size is fixed by Microsoft it cannot be changed.

Solutions to Find The Largest Mailbox in Exchange

Moreover, it is impossible to maintain the bigger size of the mailbox in users Exchange mailbox account without creating a quiet complicated Powershell script that will be connected to Exchange using EWS. Hence, to start MS exchange 2010 and user try to search mailbox exchange 2010 for single largest files in each mailbox folder. The following step describes to filter the Output with the largest item in Exchange mailbox server, which will help for resolving the problem at hand:
#1 First, open the Exchange Management Shell. Also, specify the running script on Command prompt like:
Powershell.exe - Find The Largest Files in Exchange Mailboxes
#2 As per result, report.csv file will be generated in Drive C which includes a list of largest mailbox folder with subject and size until a user can customize the above script, searching for the limited result as compared to file size 25MB.

Another Note: User can customize above script in multiple ways, for example, to change the above-mentioned 25MB size in Where-Object { $_.TopSubjectSize -gt 25MB}part will apply contrary message size to filter. Replace Get-Mailbox -ResultSize Unlimited with Get-Mailbox-Identity Administrator helps to search limited Administrator’s mailbox.

After executing the script on Command prompt, the resulting CSV file will become in this form like:
Mailbox Statistics List According to Size


While working on Exchange Server mailbox, a user may get problem when he/she want to find the largest mailbox in exchange server, it will more complex for users and creates a hurdle in the continuity of the workflow. By applying the above-mentioned Powershell script on Exchange Server, the user will easily be able to find the largest files in exchange mailboxes. Meanwhile, the process is much easier for implementing, which makes it more user-friendly. Therefore, in the above discussion a proper resolution is discussed to overcome the issue.