Exchange Mailbox Sizes: Exporting Every Mailbox to Excel

Exporting Exchange Mailbox Sizes to a Spreadsheet Getting a clear picture of which mailboxes are eating the most space on your Exchange database is a common housekeeping task, particularly ahead of a database move, an archive policy rollout, or just when storage starts running low. Rather than clicking through the Exchange Admin Center one mailbox […]

Microsoft Exchange Export Mailbox Sizes To Excel

Exporting Exchange Mailbox Sizes to a Spreadsheet

Getting a clear picture of which mailboxes are eating the most space on your Exchange database is a common housekeeping task, particularly ahead of a database move, an archive policy rollout, or just when storage starts running low. Rather than clicking through the Exchange Admin Center one mailbox at a time, the Exchange Management Shell (EMS) gives you the whole list in one command. Connect to your Exchange server, open the EMS, and run:
Get-MailboxStatistics -Database "Mailbox Database 1" | Select-Object DisplayName, TotalItemSize, ItemCount | Sort-Object TotalItemSize -Descending | Export-Csv C:\Temp\MailboxSizes.csv -NoTypeInformation
Swap in your own database name (or drop the -Database filter and use -Server instead if you want every database on a given mailbox server). The CSV that comes out opens straight into Excel, and sorting on TotalItemSize before export means the biggest mailboxes are already at the top. TotalItemSize comes back as an Exchange size object rather than a plain number, so if you want a clean numeric column for further sorting or charting in Excel, convert it — for example calling .ToString() on it gives you a readable value, or you can parse out the byte count if you need to do further calculations.

Also Works Against Exchange Online (Updated for 2026)

Get-MailboxStatistics is still unchanged on the current on-premises release, Exchange Server Subscription Edition (GA July 2025), and the same cmdlet also works against Exchange Online mailboxes if you’re connected via the Exchange Online PowerShell module — though for cloud mailboxes specifically, Microsoft’s more current recommendation is Get-EXOMailboxStatistics from the ExchangeOnlineManagement (EXO V3) module, which is purpose-built for Exchange Online and skips a couple of properties (such as LastUserActionTime) that are deprecated in the cloud version. Either way, the core export-to-CSV approach in this post carries over unchanged.

Resources


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems,

Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.