How To Quickly Search a User in Active Directory by Matching Email

This one liner would do the trick:

Get-ADUser -Filter {EmailAddress -eq 'brucelee@kimconnect.com'}
PS C:\Windows\system32> Get-ADUser -Filter {EmailAddress -eq 'brucelee@kimconnect.com'}
DistinguishedName : CN=Bruce Lee,OU=Kung Fu Fighters,DC=kimconnect,DC=com
Enabled           : True
GivenName         : Bruce
Name              : Bruce Lee
ObjectClass       : user
ObjectGUID        : hiyakk-6d92-40b5-9709-kickyahead
SamAccountName    : brucelee
SID               : S-1-5-21-1984247331-574535-000000-000000
Surname           : Lee
UserPrincipalName : brucelee@kimconnect.com

Leave a Reply

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