PowerShell – Check if email address exists

You can use -ANR to search using Ambiguous Name Resolution (so you can type their first, last, username, etc), but while ANR will match a user’s primary email address, it will not match their other SMTP aliases. ANR can return multiple matches (so ensure your code handles this case).

For email address:

get-mailbox -Anr user@domain.com

For public folder email address:

Get-MailPublicFolder -Anr user@domain.com

– Pouyan

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.