Skip to content

Instantly share code, notes, and snippets.

@JosiahSiegel
Last active February 16, 2018 13:00
Show Gist options
  • Save JosiahSiegel/90ae11c535c5b0678c9e to your computer and use it in GitHub Desktop.
Save JosiahSiegel/90ae11c535c5b0678c9e to your computer and use it in GitHub Desktop.
#LDAP Query user by sAMAccountName
SELECT $displayName, $cn FROM ROOTDSE
WHERE $objectClass='user' AND $objectCategory='Person'
AND $sAMAccountName='x0000000' --AND $cn='';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment