Commands and Notes

This is a list of commands/notes that I find useful and can’t seem to find right when I need them…

Lookup LDAP string for a Windows AD Entry: (Replace %SAMNAME%)

dsquery * domainroot -filter “(&(objectCategory=Person)(objectClass=User)(sAMAccountName=%SAMNAME%))” -attr distinguishedName -limit 0

Leave a Reply

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