Posted On February 12, 2021

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

kimconnect 0 comments
blog.KimConnect.com >> Windows >> How To Quickly Search a User in Active Directory by Matching Email

This one liner would do the trick:

Get-ADUser -Filter {EmailAddress -eq '[email protected]'}
PS C:\Windows\system32> Get-ADUser -Filter {EmailAddress -eq '[email protected]'}
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 : [email protected]

Leave a Reply

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

Related Post

Check Whether an Entity Has Access to a Directory or Its Children

Write-Host "This script just be ran in the context of a File Server Administrators member"…

R5 2400G Zen CPU Cores Undervolt and Overclocking

Some quick tested values: 3600 Mhz | 1.225 mV ~ 70 Watts (need to also…

Server PDC Time Clock Synchronization 

Configuring the Windows Time service to use an external time source To configure an internal…
Other project: DragonCoin.com