Finding large items in Exchange mailboxes


You want to find large items in Exchange mailboxes. This may be useful when using CodeTwo Exchange MigrationCodeTwo Office 365 Migration and CodeTwo Backup.


You may be in need to find big items in users mailboxes on Exchange for many reasons. One of them would be Exchange migration process, if your target Exchange Server has more strict message size policies than the source one. In the case of On-Premises MS Exchange Server it is possible to modify these limits (see our Knowledge Base article on changing the message size limit), however, it is possible such operation is not an option for you due to new corporate policies. Also, in the case of Exchange Online (Office 365), there is a fixed 150MB limit per message set by Microsoft that cannot be changed. In those cases administrators will be eager to locate big messages in the source mailboxes for further removal, archiving, etc.

Unfortunately, it is not possible to list items bigger than, or of particular sizes in users mailboxes without either using dedicated third party tools or creating complicated PowerShell scripts that would connect to your Exchange via EWS. However, starting MS Exchange Server 2010 you can search mailboxes for the single biggest item in every mailbox folder. Additionally, you can filter the output to items bigger than particular size. This is definitely not the perfect solution, but it might be sufficient for you. Follow the steps below if you wish to try it out:

  1. Start the ems Exchange Management Shell.
  2. Review the below PowerShell Cmdlet and customize it to suit your needs, then execute.
    Get-Mailbox -ResultSize Unlimited | Get-MailboxFolderStatistics -IncludeAnalysis -FolderScope All | Where-Object {(($_.TopSubjectSize -Match "MB") -and ($_.TopSubjectSize -GE 50.0)) -or ($_.TopSubjectSize -Match "GB")} | Select-Object Identity, TopSubject, TopSubjectSize | Export-CSV -path "C:\report.csv" -notype

    Running the above Cmdlet may take even a few minutes and can affect your server performance. This depends on the number of mailboxes and their contents.

    You can customize the above Cmdlet in many ways, for example changing the above used 50.0 number in Where-Object {(($_.TopSubjectSize -Match "MB") -and ($_.TopSubjectSize -GE 50.0)) -or ($_.TopSubjectSize -Match "GB")} part will apply different message size filter. Substituting Get-Mailbox -ResultSize Unlimited with Get-Mailbox -Identity Administrator will limit the search only to Administrator's mailbox, etc.

  3. As a result a report.csv file will be created in C:\ containing list of mailbox folders with subjects and sizes of biggest items in those folders. Unless you customized the above Cmdlet, search results will be limited to items bigger than 50MB.

    Please keep in mind that on workstations the path C:\ may not be writable by default.