Its OK Ive worked it out:
$Directory = New-Object DirectoryServices.DirectoryEntry("LDAP://<hostname>/<x500searchroot>","<x500account>","<password>")
$searcher = New-Object System.DirectoryServices.DirectorySearcher
$searcher.SearchRoot = $Directory
LDAP Binding with host and different x500 spec
David Zemdegs
1,591
Reputation points
Greetings,
I have to do an LDAP search and all I have been given is the FQDN host name and the search root in the format OU=xxx,O=yyy,c=zz.
Does anyone know how to construct the directory entry using both of those?
Thanks
David z
Accepted answer
-
David Zemdegs 1,591 Reputation points
2020-12-09T00:18:52.313+00:00