Skip to content

Instantly share code, notes, and snippets.

@obscuresec
Created May 1, 2014 02:20
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 obscuresec/d40270da694322bfee75 to your computer and use it in GitHub Desktop.
Save obscuresec/d40270da694322bfee75 to your computer and use it in GitHub Desktop.
Non Domain ADSI Searches
$DirEntry = New-Object DirectoryServices.DirectoryEntry('LDAP://dc=demo,dc=lab',$user,$pass)
$AdsiSearcher = New-Object DirectoryServices.DirectorySearcher($ADSI,"(objectCategory=User)")
$AdsiSearcher.findall()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment