Exporting a list of Exchange mailboxes to CSV file will be useful to get more information about the mailboxes of the users and it can be used in EdbMails migration. The CSV file can be generated in two ways,
- Via Exchange Management Shell
- Via Exchange admin center (both Exchange On-Premises and Exchange online)
1. Via Exchange Management Shell
- In case of Exchange On-Premises, start Exchange Management Shell. If you are using Office 365, connect to the Exchange Server remotely.
Run the below cmdlet
Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName, SamAccountName, PrimarySmtpAddress | Sort-Object PrimarySmtpAddress | Export-CSV c:\output\mailboxlist.csv -NoTypeInformation -Encoding Unicode
Note: Above command lists all mailboxes, corresponding AD properties and export it to the mailboxlist.csv file located under c:\output folder.
2. Via Exchange admin center (both Exchange On-Premises and Exchange online)
- Sign in to Exchange admin center. Information for Exchange Online (Office 365), Exchange Server 2019 and 2016 and Exchange Server 2013.
- Choose the recipients. A list of user mailboxes will be displayed as below,

- Click the … button and then select 'Export data to a CSV file'.

- In the Export data window, select the checkboxes that you wish to export.

- Click the export button to download the file in local drive.