Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$Server = "LDAP://servername:389/O=Customer-Aus"
$Username = "CN=Darren Kloud Robinson,OU=OrgU,O=Org-Aus"
$Password = "******"
$entry = New-Object System.DirectoryServices.DirectoryEntry($Server,$Username,$Password,"none")
$LDAPfilter = "(objectclass=*)"
$directorySearcher = New-Object System.DirectoryServices.DirectorySearcher($entry,$LDAPfilter)
$results = $directorySearcher.FindAll()
$results.Count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.