Powershell LDAP FindAll() error

0

I'm trying to connect to new LDAP server which gives me following error. Old site was working without any problems. Can you help?

$dn = "LDAP://ldap.site.cz:389/ou=People,dc=site,dc=com"
$auth = [System.DirectoryServices.AuthenticationTypes]::Anonymous
$de = New-Object System.DirectoryServices.DirectoryEntry($dn,$null,$null,$auth) 
$ds = New-Object System.DirectoryServices.DirectorySearcher($de)
[void]$ds.PropertiesToLoad.Add("uid")
$colResults = $ds.FindAll()

Which gives me...

Exception calling "FindAll" with "0" argument(s): "Unknown error (0x80005000)"
At line:9 char:1
+ $colResults = $ds.FindAll()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : COMException
powershell
asked on Stack Overflow Dec 4, 2017 by Neonik

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0