My OpenLDAP server is setup in Linux. I want to connect to it from Windows 10 through Powershell This is the code snippet that I'm using
$path = 'LDAP://xxx.xxx.x.xxx:xxx/dc=xyz,dc=com'
$username = 'admin'
$password = 'password'
Try{
$root = [adsi]::new($path,$username,$password)
$searcher = [adsisearcher]$root
$searcher.findone()
}
Catch{
Write-Host "ERROR: $_"
}
I'm getting the following error -
ERROR: Exception calling "FindAll" with "0" argument(s): "Unknown error (0x80005000)"
My aim after connecting to the server is to perform the equivalent of 'ldapsearch' and retrieve the LDAP Password Policy setup in the OpenLDAP server.
User contributions licensed under CC BY-SA 3.0