Published: 09.Jun 2020
Categories:

Find users by specific email domain with PowerShell

Sometimes you will need to find users by specific domain. Here is short PowerShell cmdlet which you can use:

Note:
I will use new Get-EXOMailbox cmdlet, and Exchange Management Module V2 is mandatory for that.

Get-EXOMailbox -ResultSize Unlimited -Filter {EmailAddresses -like "*@domain.com"} | Select DisplayName

Replace @domain.com with your desired domain.

Additionally you can export the result with Export-CSV cmdlet.
Example:

Export-CSV -path $env:USERPROFILE\Desktop\output.csv

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
PowerAddict.net - Lubomir Goban  ---  Find me on - 
LinkedIn
0
Would love your thoughts, please comment.x
()
x