Link to home
Start Free TrialLog in
Avatar of Sys @dmin
Sys @dminFlag for Netherlands

asked on

Check if an e-mail alias is being used/ if users are still sending mail to this alias

Hi all,

I would like to know if it is possible too check if an e-mail alias is being used?

Situation:
- 100x Office 365 E3 licenses
- Exchange Online
- Domain A
- Domain B

E.g.:
A user with name "Testuser" uses our default e-mail adres with our "Domain A" so his e-mail adress is "Testuser@domainA.com".
"Testuser" also has an e-mail alias setup with our "Domain B" so his e-mail alias is "Testuser@domainB.com".

We are pashing out our "Domain B" but to do so I would like to inventorise if there are e-mails being send to users with a "Domain B" alias.

I would like to know if anyone can help me achieve this?

I already found a Powershell command to see which mailboxes are using "Domain B" alias - maybe it can help you so:  

Get-Recipient -ResultSize unlimited| Where {$_.EmailAddresses -like "*@DomainB.com"} | FL DisplayName,EmailAddresses

Open in new window


I would like to thank you in advance!

Kind Regards,
ASKER CERTIFIED SOLUTION
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sys @dmin

ASKER

Hi Vasil,

I already checked if the domain is used for any aliases by:
Get-Recipient -ResultSize unlimited| Where {$_.EmailAddresses -like "*@DomainB.com"} | FL DisplayName,EmailAddresses

Open in new window


Your script on the other hand is exactly what I mean, so thank you very much!
Vasil solved my question!