Export Exchange Mailbox CSV: Pulling Address Details

Exporting mailbox address details to CSV is a quick way to get a clean list of every mailbox’s display name, primary SMTP address, and hosting database — useful for audits, migration planning, or just handing a contact list to another team. The Command Get-Recipient -Resultsize unlimited | select name, primarysmtpaddress, Database | export-csv C:\temp\addresses.csv -NoTypeInformation […]

Export Exchange Mailbox Address Details To CSV
Exporting mailbox address details to CSV is a quick way to get a clean list of every mailbox’s display name, primary SMTP address, and hosting database — useful for audits, migration planning, or just handing a contact list to another team.

The Command

Get-Recipient -Resultsize unlimited | select name, primarysmtpaddress, Database | export-csv C:\temp\addresses.csv -NoTypeInformation
Run this from the Exchange Management Shell. -Resultsize unlimited is important — without it, Exchange caps results at 1000 recipients by default, which silently truncates the list on any reasonably sized organisation. -NoTypeInformation drops the type-header line from the CSV, which most downstream tools (Excel, Power BI, another script) don’t expect.

FAQ

Can I filter to just user mailboxes, not distribution groups or contacts?
Yes — use Get-Mailbox instead of Get-Recipient, which returns only actual mailboxes rather than every recipient type in the organisation. Can I add more columns, like department or job title?
Yes, but not from Get-Recipient/Get-Mailbox directly — those properties live on the Active Directory user object (on-prem) or the Entra ID/Exchange Online user object, not the mailbox object. Pull them with Get-User instead, or join the two datasets: Get-Mailbox -ResultSize Unlimited | Get-User | Select Name, Department, Title, PrimarySmtpAddress pulls both mailbox and directory attributes in one pipeline. Does this work the same on Exchange Online?
Yes, once you’re connected via Connect-ExchangeOnline. On larger Exchange Online tenants specifically, the newer Get-EXORecipient/Get-EXOMailbox cmdlets are worth switching to instead — they’re REST-based and hold up better on large result sets than the classic Get-Recipient/Get-Mailbox cmdlets, which are more prone to timing out on very large pulls.

Resources

🛠️

Gear We Recommend

A few general tech accessories worth having alongside this.

Browse our General Tech Accessories picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.


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.