How to Export Microsoft 365 Email Aliases using Exchange Online PowerShell
Question details
Administrators need to export email aliases for all Microsoft 365 mailboxes, including licensed and unlicensed accounts, since the admin center user export no longer includes aliases.
- Product
- Microsoft 365 Exchange Online
- Device & OS
- not provided
- Scenario
- Exporting a complete list of email aliases for various mailbox types to a CSV file.
- Observed behavior
- The default Microsoft 365 admin center user export feature does not include alias information, requiring administrators to find a PowerShell workaround.
Ensure you have the Exchange Online PowerShell module installed and possess the necessary administrator credentials to connect to your Microsoft 365 tenant.
Use Exchange Online PowerShell to Export Aliases to CSV
Connect to Exchange Online and run the Get-Mailbox cmdlet with appropriate recipient types to retrieve and filter alias data for all mailboxes.
The default script provided for UserMailbox objects only captures licensed users. By expanding the RecipientTypeDetails to include Shared, Room, and Equipment mailboxes, you can capture aliases across your entire organization.
Open PowerShell as an administrator and run the command 'Connect-ExchangeOnline' to authenticate with your Microsoft 365 administrator credentials.
Run the Get-Mailbox cmdlet targeting all necessary recipient types by appending '-RecipientTypeDetails UserMailbox, SharedMailbox, RoomMailbox, EquipmentMailbox'.
Pipe the results to Select-Object to format the aliases and strip out unnecessary prefixes (like smtp: or SIP:) and system addresses (*SPO*). Finally, append '| Export-Csv -Path "C:\Aliases.csv" -NoTypeInformation -Encoding UTF8' to save the output.
Open and Analyze Your Exported Aliases CSV with WPS Office
After exporting your Microsoft 365 aliases using PowerShell, you will need a robust spreadsheet application to view and manage the CSV file. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Excel.
- 1. Download and Install WPS Office: Get the free installation package from the official WPS website and complete the setup.
- 2. Launch WPS Spreadsheet: Open the WPS Office suite and click on the 'Spreadsheet' module.
- 3. Open your CSV File: Navigate to Menu > Open, locate the 'Aliases.csv' file you exported from PowerShell, and open it to view your data.

Frequently Asked Questions
Why are aliases missing from the Microsoft 365 admin center export?
Microsoft recently updated the default user export functionality in the admin center. It no longer includes secondary email addresses (aliases) by default, requiring administrators to use Exchange Online PowerShell for this specific data.
How do I include unlicensed shared mailboxes in the PowerShell export?
You can include unlicensed mailboxes by ensuring your Get-Mailbox command specifies additional recipient types, such as SharedMailbox, RoomMailbox, and EquipmentMailbox, rather than just UserMailbox.
What format does the PowerShell script use to save the aliases?
The script uses the Export-Csv cmdlet to save the alias data into a comma-separated values (CSV) file, formatted with UTF-8 encoding so it can be easily opened in spreadsheet applications.




