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

How To Upgrade NextCloud 22.1.1 to 22.2.0 When Deployed with Kubernetes & Helm

Step 1: Navigate to nextcloud > html > edit version.php <?php $OC_Version = array(22,1,1,2); $OC_VersionString…

PowerShell: Find Windows RDS Roles and Their Licensing Servers

# Get TS Licensing Servers (Enterprise or AD Registered) $termLicenseServers=Get-ADGroupMember -Identity "Terminal Server License Servers"…

How to manually point servers in the DMZ to WSUS server for updates

The servers in the DMZ are not part of the domain and you must manually…