Powershell LDAP FindAll()错误

时间:2017-12-04 02:23:51

标签: powershell

我正在尝试连接到新的LDAP服务器,这会给我以下错误。旧网站没有任何问题。你能帮忙吗?

$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()

这给了我......

Exception calling "FindAll" with "0" argument(s): "Unknown error (0x80005000)"
At line:9 char:1
+ $colResults = $ds.FindAll()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : COMException

0 个答案:

没有答案