Skip to content

Ldap Server Capabilities

Jiri Formacek edited this page Nov 22, 2024 · 2 revisions

Capabilities of your LDAP server

Which LDAP controls my server supports?

#Can my LDAP server support paged search?
$Ldap = Get-LdapConnection -LdapServer ldap.mydomain.com
$dse = Get-RootDse -LdapConnection $Ldap
if($dse.supportedControl -contains '1.2.840.113556.1.4.319') {
  'Paged search supported!'
}

# Can my LDAP server retrieve attributes via ranged retrieval?
if($dse.supportedControl -contains '1.2.840.113556.1.4.802') {
  'Ranged attribute retrieval supported!'
}

How time on my LDAP server differs from my time?

$Ldap = Get-LdapConnection -LdapServer ldap.mydomain.com
(Get-RootDse -LdapConnection $Ldap).CurrentTime - [DateTime]::Now

Which server did I connect to?

$Ldap = Get-LdapConnection -LdapServer ldap_behind_load_balancer.mydomain.com
(Get-RootDse -LdapConnection $Ldap).dnsHostName

Clone this wiki locally