TestimoX

API Reference

Class

Ldap

Namespace ADPlayground.Ldap
Assembly ADPlayground
Modifiers static

PowerShell-like facade for LDAP connectivity testing that returns typed, readable results. Prefer this over calling low-level scanners directly.

Inheritance

  • Object
  • Ldap

Methods

public static IReadOnlyList<LdapServerReadable> TestDomain(String domain, Boolean skipRodc = false, NetworkCredential credential = null, Nullable<AuthType> authType = null, String identity = null, Boolean verifyCertificate = true, Boolean skipGlobalCatalog = false, Int32 retryCount = 1, Int32 retryDelayMs = 100, Int32 portLdap = 389, Int32 portLdaps = 636, Int32 gcPortLdap = 3268, Int32 gcPortLdaps = 3269, Int32 maxConcurrency = 4, Boolean probeLegacyTls = false, Int32 serverBudgetMs = 10000, Action<LdapServerReadable> onResult = null, Int32 perPortTimeoutMs = 3000, Int32 readableEnrichmentTimeoutMs = 0, Boolean includeFacts = true, Int32 factsTimeoutMs = 2500) #
Returns: IReadOnlyList<LdapServerReadable>

Tests all domain controllers in the given domain and returns typed, readable connectivity records.

Parameters

domain System.String requiredposition: 0
DNS domain name.
skipRodc System.Boolean = false optionalposition: 1
Skip Read-Only Domain Controllers.
credential System.Net.NetworkCredential = null optionalposition: 2
Optional network credential for LDAP binds (for identity search).
authType System.Nullable{System.DirectoryServices.Protocols.AuthType} = null optionalposition: 3
Optional authentication type override.
identity System.String = null optionalposition: 4
Optional identity string to probe in RootDSE.
verifyCertificate System.Boolean = true optionalposition: 5
Verify LDAPS certificates and compute certificate fields.
skipGlobalCatalog System.Boolean = false optionalposition: 6
Skip GC (3268/3269) tests.
retryCount System.Int32 = 1 optionalposition: 7
Port test retry count.
retryDelayMs System.Int32 = 100 optionalposition: 8
Delay between retries in milliseconds.
portLdap System.Int32 = 389 optionalposition: 9
LDAP port (default 389).
portLdaps System.Int32 = 636 optionalposition: 10
LDAPS port (default 636).
gcPortLdap System.Int32 = 3268 optionalposition: 11
GC LDAP port (default 3268).
gcPortLdaps System.Int32 = 3269 optionalposition: 12
GC LDAPS port (default 3269).
maxConcurrency System.Int32 = 4 optionalposition: 13
Max parallel probes.
probeLegacyTls System.Boolean = false optionalposition: 14
When true, performs additional LDAPS handshakes to detect accepted TLS versions.
serverBudgetMs System.Int32 = 10000 optionalposition: 15
Total per-server wall-clock budget in milliseconds.
onResult System.Action{ADPlayground.Ldap.LdapServerReadable} = null optionalposition: 16
Optional callback invoked as each server result is materialized.
perPortTimeoutMs System.Int32 = 3000 optionalposition: 17
Timeout per bind/search/certificate fetch in milliseconds.
readableEnrichmentTimeoutMs System.Int32 = 0 optionalposition: 18
Optional tighter budget for enriching the readable view (site/OS/IP); defaults to perPortTimeoutMs when 0.
includeFacts System.Boolean = true optionalposition: 19
When true, enrich results with DC facts (RODC/GC/site/OS) if quickly retrievable.
factsTimeoutMs System.Int32 = 2500 optionalposition: 20
Timeout budget in milliseconds for DC facts enrichment.
public static Task<IReadOnlyList<LdapServerReadable>> TestDomainAsync(String domain, Boolean skipRodc = false, NetworkCredential credential = null, Nullable<AuthType> authType = null, String identity = null, Boolean verifyCertificate = true, Boolean skipGlobalCatalog = false, Int32 retryCount = 1, Int32 retryDelayMs = 100, Int32 portLdap = 389, Int32 portLdaps = 636, Int32 gcPortLdap = 3268, Int32 gcPortLdaps = 3269, Int32 maxConcurrency = 4, Boolean probeLegacyTls = false, Int32 serverBudgetMs = 10000, Action<LdapServerReadable> onResult = null, Int32 perPortTimeoutMs = 3000, Int32 readableEnrichmentTimeoutMs = 0, Boolean includeFacts = true, Int32 factsTimeoutMs = 2500) #
Returns: Task<IReadOnlyList<LdapServerReadable>>

Async version of Int32).

Parameters

domain System.String requiredposition: 0
DNS domain name.
skipRodc System.Boolean = false optionalposition: 1
Skip Read-Only Domain Controllers.
credential System.Net.NetworkCredential = null optionalposition: 2
Optional network credential for LDAP binds (for identity search).
authType System.Nullable{System.DirectoryServices.Protocols.AuthType} = null optionalposition: 3
Optional authentication type override.
identity System.String = null optionalposition: 4
Optional identity string to probe in RootDSE.
verifyCertificate System.Boolean = true optionalposition: 5
Verify LDAPS certificates and compute certificate fields.
skipGlobalCatalog System.Boolean = false optionalposition: 6
Skip GC (3268/3269) tests.
retryCount System.Int32 = 1 optionalposition: 7
Port test retry count.
retryDelayMs System.Int32 = 100 optionalposition: 8
Delay between retries in milliseconds.
portLdap System.Int32 = 389 optionalposition: 9
LDAP port (default 389).
portLdaps System.Int32 = 636 optionalposition: 10
LDAPS port (default 636).
gcPortLdap System.Int32 = 3268 optionalposition: 11
GC LDAP port (default 3268).
gcPortLdaps System.Int32 = 3269 optionalposition: 12
GC LDAPS port (default 3269).
maxConcurrency System.Int32 = 4 optionalposition: 13
Max parallel probes.
probeLegacyTls System.Boolean = false optionalposition: 14
When true, performs additional LDAPS handshakes to detect accepted TLS versions.
serverBudgetMs System.Int32 = 10000 optionalposition: 15
Total per-server wall-clock budget in milliseconds.
onResult System.Action{ADPlayground.Ldap.LdapServerReadable} = null optionalposition: 16
Optional callback invoked as each server result is materialized.
perPortTimeoutMs System.Int32 = 3000 optionalposition: 17
Timeout per bind/search/certificate fetch in milliseconds.
readableEnrichmentTimeoutMs System.Int32 = 0 optionalposition: 18
Optional tighter budget for enriching the readable view (site/OS/IP); defaults to perPortTimeoutMs when 0.
includeFacts System.Boolean = true optionalposition: 19
When true, enrich results with DC facts (RODC/GC/site/OS) if quickly retrievable.
factsTimeoutMs System.Int32 = 2500 optionalposition: 20
Timeout budget in milliseconds for DC facts enrichment.
public static IReadOnlyList<LdapServerReadable> TestForest(String forest = null, Boolean includeTrusts = false, Boolean skipRodc = false, NetworkCredential credential = null, Nullable<AuthType> authType = null, String identity = null, Boolean verifyCertificate = true, Boolean skipGlobalCatalog = false, Int32 retryCount = 1, Int32 retryDelayMs = 100, Int32 portLdap = 389, Int32 portLdaps = 636, Int32 gcPortLdap = 3268, Int32 gcPortLdaps = 3269, Int32 maxConcurrency = 4, Boolean probeLegacyTls = false, Int32 serverBudgetMs = 10000, Action<LdapServerReadable> onResult = null, Int32 perPortTimeoutMs = 3000, Int32 readableEnrichmentTimeoutMs = 0, Boolean includeFacts = true, Int32 factsTimeoutMs = 2500, IReadOnlyList<String> certificateIncludeDomainName = null) #
Returns: IReadOnlyList<LdapServerReadable>

Tests all domain controllers in the given forest and returns typed, readable connectivity records.

Parameters

forest System.String = null optionalposition: 0
Optional forest name; defaults to the current forest.
includeTrusts System.Boolean = false optionalposition: 1
When true, attempts to include domains from trusted forests (if enabled by discovery options).
skipRodc System.Boolean = false optionalposition: 2
Skip Read-Only Domain Controllers.
credential System.Net.NetworkCredential = null optionalposition: 3
Optional network credential for LDAP binds (for identity search).
authType System.Nullable{System.DirectoryServices.Protocols.AuthType} = null optionalposition: 4
Optional authentication type override.
identity System.String = null optionalposition: 5
Optional identity string to probe.
verifyCertificate System.Boolean = true optionalposition: 6
Verify LDAPS certificates and compute certificate fields.
skipGlobalCatalog System.Boolean = false optionalposition: 7
Skip GC (3268/3269) tests.
retryCount System.Int32 = 1 optionalposition: 8
Port test retry count.
retryDelayMs System.Int32 = 100 optionalposition: 9
Delay between retries in milliseconds.
portLdap System.Int32 = 389 optionalposition: 10
LDAP port (default 389).
portLdaps System.Int32 = 636 optionalposition: 11
LDAPS port (default 636).
gcPortLdap System.Int32 = 3268 optionalposition: 12
GC LDAP port (default 3268).
gcPortLdaps System.Int32 = 3269 optionalposition: 13
GC LDAPS port (default 3269).
maxConcurrency System.Int32 = 4 optionalposition: 14
Max parallel probes.
probeLegacyTls System.Boolean = false optionalposition: 15
When true, performs additional LDAPS handshakes to detect accepted TLS versions.
serverBudgetMs System.Int32 = 10000 optionalposition: 16
Total per-server wall-clock budget in milliseconds.
onResult System.Action{ADPlayground.Ldap.LdapServerReadable} = null optionalposition: 17
Optional callback invoked as each server result is materialized.
perPortTimeoutMs System.Int32 = 3000 optionalposition: 18
Timeout per bind/search/certificate fetch in milliseconds.
readableEnrichmentTimeoutMs System.Int32 = 0 optionalposition: 19
Optional tighter budget for enriching the readable view (site/OS/IP); defaults to perPortTimeoutMs when 0.
includeFacts System.Boolean = true optionalposition: 20
When true, enrich results with DC facts (RODC/GC/site/OS) if quickly retrievable.
factsTimeoutMs System.Int32 = 2500 optionalposition: 21
Timeout budget in milliseconds for DC facts enrichment.
certificateIncludeDomainName System.Collections.Generic.IReadOnlyList{System.String} = null optionalposition: 22
Additional domain names that must appear in the certificate DNS list (SAN).
public static Task<IReadOnlyList<LdapServerReadable>> TestForestAsync(String forest = null, Boolean includeTrusts = false, Boolean skipRodc = false, NetworkCredential credential = null, Nullable<AuthType> authType = null, String identity = null, Boolean verifyCertificate = true, Boolean skipGlobalCatalog = false, Int32 retryCount = 1, Int32 retryDelayMs = 100, Int32 portLdap = 389, Int32 portLdaps = 636, Int32 gcPortLdap = 3268, Int32 gcPortLdaps = 3269, Int32 maxConcurrency = 4, Boolean probeLegacyTls = false, Int32 serverBudgetMs = 10000, Action<LdapServerReadable> onResult = null, Int32 perPortTimeoutMs = 3000, Int32 readableEnrichmentTimeoutMs = 0, Boolean includeFacts = true, Int32 factsTimeoutMs = 2500, IReadOnlyList<String> certificateIncludeDomainName = null) #
Returns: Task<IReadOnlyList<LdapServerReadable>>

Async version of String>).

Parameters

forest System.String = null optionalposition: 0
Optional forest name; defaults to the current forest.
includeTrusts System.Boolean = false optionalposition: 1
When true, attempts to include domains from trusted forests (if enabled by discovery options).
skipRodc System.Boolean = false optionalposition: 2
Skip Read-Only Domain Controllers.
credential System.Net.NetworkCredential = null optionalposition: 3
Optional network credential for LDAP binds (for identity search).
authType System.Nullable{System.DirectoryServices.Protocols.AuthType} = null optionalposition: 4
Optional authentication type override.
identity System.String = null optionalposition: 5
Optional identity string to probe.
verifyCertificate System.Boolean = true optionalposition: 6
Verify LDAPS certificates and compute certificate fields.
skipGlobalCatalog System.Boolean = false optionalposition: 7
Skip GC (3268/3269) tests.
retryCount System.Int32 = 1 optionalposition: 8
Port test retry count.
retryDelayMs System.Int32 = 100 optionalposition: 9
Delay between retries in milliseconds.
portLdap System.Int32 = 389 optionalposition: 10
LDAP port (default 389).
portLdaps System.Int32 = 636 optionalposition: 11
LDAPS port (default 636).
gcPortLdap System.Int32 = 3268 optionalposition: 12
GC LDAP port (default 3268).
gcPortLdaps System.Int32 = 3269 optionalposition: 13
GC LDAPS port (default 3269).
maxConcurrency System.Int32 = 4 optionalposition: 14
Max parallel probes.
probeLegacyTls System.Boolean = false optionalposition: 15
When true, performs additional LDAPS handshakes to detect accepted TLS versions.
serverBudgetMs System.Int32 = 10000 optionalposition: 16
Total per-server wall-clock budget in milliseconds.
onResult System.Action{ADPlayground.Ldap.LdapServerReadable} = null optionalposition: 17
Optional callback invoked as each server result is materialized.
perPortTimeoutMs System.Int32 = 3000 optionalposition: 18
Timeout per bind/search/certificate fetch in milliseconds.
readableEnrichmentTimeoutMs System.Int32 = 0 optionalposition: 19
Optional tighter budget for enriching the readable view (site/OS/IP); defaults to perPortTimeoutMs when 0.
includeFacts System.Boolean = true optionalposition: 20
When true, enrich results with DC facts (RODC/GC/site/OS) if quickly retrievable.
factsTimeoutMs System.Int32 = 2500 optionalposition: 21
Timeout budget in milliseconds for DC facts enrichment.
certificateIncludeDomainName System.Collections.Generic.IReadOnlyList{System.String} = null optionalposition: 22
Additional domain names that must appear in the certificate DNS list (SAN).