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.)
Fortunately 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.
- Open a POWER SHELL as an administrator then enter these commands pressing ENTER after each one
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
get-mailbox -identity *|select-object Identity, EmailAddresses | export-csv c:\O365addresses.csv
- Open C:\O365addresses.csv with your favorite editor (Excel, NotePad, NotePad++) and search for the alias you care about