Skip to content

Instantly share code, notes, and snippets.

@WJDigby
Last active July 7, 2016 11:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WJDigby/2e14cecc2fb199dd68d6 to your computer and use it in GitHub Desktop.
Save WJDigby/2e14cecc2fb199dd68d6 to your computer and use it in GitHub Desktop.
use post/windows/gather/enum_ad_computers
set FIELDS distinguishedName,dNSHostname,description,operatingSystem,operatingSystemServicePack
set FILTER (&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=8192))
run
set FILTER (&(objectCategory=computer)(operatingSystem=*server*)(!(userAccountControl:1.2.840.113556.1.4.803:=8192)))
run
set FILTER (&(objectCategory=computer)(!(operatingSystem=*server*)))
run
set FIELDS distinguishedName,name,mail,description
set FILTER (&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
run
set FILTER (&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))
run
set FILTER (&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))
run
set FILTER (&(objectCategory=person)(objectClass=user)(cn=adm*))
run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment