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.
Set-ExecutionPolicy RemoteSigned
$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
This website uses cookies.