Export Exchange mailbox size to CSV with PowerShell and Exchange Admin Center to generate a detailed mailbox size report. This guide explains how to export mailbox sizes to CSV Exchange 2016, 2019, 2013, and SE (Subscription Edition).
Exporting Exchange mailbox sizes to CSV means creating a CSV (Comma-Separated Values) report that contains the storage size details of Exchange mailboxes. In this guide, I’ll share all my experiences and information regarding this. So, without wasting any time, let me start explaining the reasons behind this.
Why Export Exchange Mailbox Sizes to CSV?
When I want a proper report of users’ Exchange mailbox sizes, at that time I found that most of the people need this CSV report because:
- Identify which users’ mailboxes consume more space.
- Analyze Exchange database usage.
- Prepare storage-capacity reports.
- Find those mailboxes that can exceed quota quickly.
- Filter mailbox sizes in Excel.
- Support Exchange migration and cleanup projects.
Checking each Exchange mailbox individually becomes hectic and time-consuming. To bypass this, administrators can generate a single CSV report containing mailbox information.
Now, without wasting any time, I’ll share all the possible techniques to export mailbox sizes to CSV Exchange 2016, 2013, 2019, and SE.
How to Export Exchange Mailbox Size to CSV?
There are several ways to export Exchange mailbox size data to a CSV file, depending on your Exchange environment. For Exchange Server, PowerShell is the most direct method to save mailbox sizes as a CSV report. I know this requires technical knowledge, but we have no other option.
Below, we will cover the practical methods to export mailbox sizes to CSV Exchange 2016, 2019, 2013, and SE, including how to generate reports with mailbox size:
Export Exchange Mailbox Size to CSV Using PowerShell
The easiest way to export Exchange mailbox size to CSV is with the Get-MailboxStatistics cmdlet:
Open the Exchange Management Shell and run:
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName,PrimarySmtpAddress,TotalItemSize,ItemCount | Export-Csv "C:\MailboxSizeReport.csv" -NoTypeInformation
This command gets mailbox details and saves them as a CSV file.
The resulting report can contain information such as:
| Display Name | Primary SMTP Address | Total Item Size | Item Count |
| Akshat | [email protected] | 7.14 GB | 62450 |
| Angela | [email protected] | 8.71 GB | 58320 |
| David Brown | [email protected] | 2.14 GB | 18760 |
You can open MailboxSizeReport.csv in Excel and sort the mailboxes by size.
Export Exchange 2013, 2016, 2019 & SE Mailbox Sizes to CSV
If you specifically need to Exchange 2016 export mailbox sizes to CSV, the same PowerShell approach works similarly. Moreover, these same cmdlets can be used to export mailbox sizes from Exchange Server 2016, 2013, 2019, and SE. For the same, run:
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName,PrimarySmtpAddress,TotalItemSize,ItemCount | Export-Csv "C:\Exchange2016MailboxSizes.csv" -NoTypeInformation
This is useful when you want to export mailbox sizes to CSV Exchange 2016 for all mailboxes in the organization.
Let me clarify the command’s meaning:
- Get-Mailbox: Gets the Exchange mailboxes.
- ResultSize Unlimited: Includes all mailboxes.
- Get-MailboxStatistics: Gets mailbox size and item count.
- Select: Selects the details for the report.
- Export-Csv: Saves the results as a CSV file.
Note: The same PowerShell command can be used to export mailbox sizes to CSV in Exchange Server 2013, 2016, 2019, and Exchange Server Subscription Edition (SE).
Export Mailbox Sizes with Database Information
Sometimes, you may also need to include the Exchange database for each mailbox. To do so, the commands you need to run:
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName,PrimarySmtpAddress,Database,TotalItemSize,ItemCount | Export-Csv "C:\ExchangeMailboxReport.csv" -NoTypeInformation
The CSV report will then contain columns such as:
- Display Name
- Email Address
- Database
- Total Item Size
- Item Count
Export Exchange Mailbox List to CSV
If you only want to export the Exchange mailbox list to CSV, use Get-Mailbox directly.
Get-Mailbox -ResultSize Unlimited | Select DisplayName, PrimarySmtpAddress,Database | Export-Csv "C:\ExchangeMailboxList.csv" -NoTypeInformation
This creates a list of Exchange mailboxes with their email addresses and databases. It does not show mailbox sizes. For mailbox size, use Get-MailboxStatistics.
Export Exchange 2016 Mailbox Size in GB
The TotalItemSize value can be difficult to sort in Excel. You can convert the mailbox size to GB before exporting it. For this:
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName,PrimarySmtpAddress, @{Name="MailboxSizeGB";Expression={[math]::Round(($_.TotalItemSize.Value.ToBytes() / 1GB),2)}}, ItemCount | Export-Csv "C:\MailboxSizeGB.csv" -NoTypeInformation
The CSV will contain a numeric mailbox-size column such as:
| Display Name | Email Address | Mailbox Size (GB) | Item Count |
| Akshat | [email protected] | 7.14 | 62450 |
| Sarah Jones | [email protected] | 8.71 | 58320 |
This format makes it easy to sort the MailboxSizeGB column from largest to smallest in Excel.
Export Only Large Exchange Mailboxes
You can also find mailboxes that are larger than a specific size. For example, you can find mailboxes larger than 10 GB:
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where-Object {$_.TotalItemSize.Value.ToBytes() -gt 10GB} | Select DisplayName,PrimarySmtpAddress,TotalItemSize,ItemCount | Export-Csv "C:\LargeMailboxes.csv" -NoTypeInformation
This helps manage large mailboxes in seconds.
Export Mailbox Size for a Specific Exchange Database
To export mailbox sizes from a specific database, select that database:
Get-Mailbox -Database "Mailbox Database 01" -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName,PrimarySmtpAddress,TotalItemSize,ItemCount | Export-Csv "C:\DatabaseMailboxSizes.csv" -NoTypeInformation
Replace “Mailbox Database 01” with your actual Exchange database name.
This approach is useful when you want to export mailbox sizes to CSV Exchange 2016, 2013, 2019, and SE databases by database.
Export Exchange Mailbox Size with Quota Information
You can also compare mailbox sizes with their quotas. Use the following command:
Get-Mailbox -ResultSize Unlimited | ForEach-Object { $Mailbox = $_ $Stats = Get-MailboxStatistics -Identity $Mailbox.Identity [PSCustomObject]@{ DisplayName = $Mailbox.DisplayName Email = $Mailbox.PrimarySmtpAddress Database = $Mailbox.Database MailboxSize = $Stats.TotalItemSize ItemCount = $Stats.ItemCount ProhibitSendQuota = $Mailbox.ProhibitSendQuota } } | Export-Csv "C:\ExchangeMailboxQuotaReport.csv" -NoTypeInformation
Export Mailbox Sizes and Sort Them by Size
If you want the largest mailboxes at the top of the report, you can sort the results before exporting them:
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select DisplayName,PrimarySmtpAddress,TotalItemSize,ItemCount | Export-Csv "C:\MailboxSizesSorted.csv" -NoTypeInformation
Need to Backup Exchange Mailbox Data on Mac?
After saving Exchange mailbox sizes to CSV, you may also need to export Exchange mailbox data before clearing clutter from the mailboxes.
To backup Exchange Server data in CSV format, I would suggest SysTools Mac Email Backup Tool as it provides a simple way to back up Exchange server emails simultaneously. It can save mailbox data in multiple formats, including CSV, PST, PDF, MBOX, EML, EMLX, TXT, MSG, HTML, and MHT.
Having a backup of Exchange emails is necessary to safeguard them from data breaches or accidental data losses. Moreover, you can try this wizard for free on Windows and macOS. However, its Windows version supports only five file formats to export, i.e. PST, MBOX, MSG, EML, and PDF. So, choose the version accordingly as per your requirements.
Author’s Verdict
If your objective is to export Exchange mailbox size to CSV, PowerShell is one of the simplest approaches. If you need a more detailed report, you can add:
- Database information
- Mailbox quotas
- Item counts
- Convert mailbox sizes into GB
This makes the exported CSV more useful for Exchange storage analysis and Exchange to Office 365 migration planning.