logo
search
Exchange Connection Problems

How to Export Microsoft 365 Email Aliases using Exchange Online PowerShell

Maira MehtabMaira Mehtab Sep 22, 2026 868 views

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.
Before you start

Ensure you have the Exchange Online PowerShell module installed and possess the necessary administrator credentials to connect to your Microsoft 365 tenant.

Solution 1Recommended

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.

1
Connect to Exchange Online

Open PowerShell as an administrator and run the command 'Connect-ExchangeOnline' to authenticate with your Microsoft 365 administrator credentials.

2
Execute the Get-Mailbox command

Run the Get-Mailbox cmdlet targeting all necessary recipient types by appending '-RecipientTypeDetails UserMailbox, SharedMailbox, RoomMailbox, EquipmentMailbox'.

3
Filter and export the data

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.

Script Formatting: Ensure you run PowerShell as an Administrator and have the proper Execution Policy set to allow scripts to run smoothly in your environment.
Free Microsoft Office alternative

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. 1. Download and Install WPS Office: Get the free installation package from the official WPS website and complete the setup.
  2. 2. Launch WPS Spreadsheet: Open the WPS Office suite and click on the 'Spreadsheet' module.
  3. 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.
Fully compatible with Microsoft Excel (.xlsx, .csv, .xls) formats for seamless data analysis.Free and lightweight suite including Writer, Spreadsheet, and Presentation tools.Familiar user interface ensuring a smooth transition from Microsoft Office.Powerful data filtering, sorting, and formatting features perfect for managing admin CSV exports.
QA img-9

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.