SOLVED: VIDEO: How To Export All Email Addresses and Alias to A File From Office365 Exchange Online

If you work with Exchange you know that there is no way to search for email alias using the console.  That can be very frustrating when you need to assign an alias to someone and Exchange Online tells you it is already in use.  (We have the instructions for How to Find The Owner Of an Email Alias in Exchange On-Prem HERE.)

export all email addresses and aliases to a fileFortunately it is not very hard to export all of your email aliases and addresses to a file and then search through them.  To the right is a screen shot of the all the commands and below is a video of that export.

    1. Open a POWER SHELL as an administrator then enter these commands pressing ENTER after each one
    2. Set-ExecutionPolicy RemoteSigned
    3. $UserCredential = Get-Credential
    4. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection
    5. Import-PSSession $Session -DisableNameChecking
    6. get-mailbox -identity *|select-object Identity, EmailAddresses | export-csv c:\O365addresses.csv
    7. Open C:\O365addresses.csv with your favorite editor (Excel, NotePad, NotePad++) and search for the alias you care about


Questions or Comments?