Exchange 2019: Search for all Email Addresses

Exchange 2019 EAC does not show results if you search for parts of email addresses if they are not in the primary email address. Let's take for example the following mailbox:

Primary email address: [email protected]

This mailbox has a second email address: [email protected]

In EAC, you can search for "admin" and will find the mailbox. But if you search for "postmaster", you will not find it. Here, Exchange Powerhell helps, just type:

Get-Mailbox -ResultSize Unlimited -Filter {EmailAddresses -like "*postmaster*"} | Select-Object DisplayName,PrimarySmtpAddress, @{Name="EmailAddresses";Expression={($_.EmailAddresses | Where-Object {$_ -clike "smtp*"} | ForEach-Object {$_ -replace "smtp:",""}) -join ","}} | Sort-Object DisplayName

 

Leave a Reply

Your email address will not be published. Required fields are marked *