AD-CFG-06 - LDAP query policy count should be retrievable
Overviewβ
LDAP query policies define resource limits for directory queries (for example, controlling maximum result sizes and query behaviors). Weak or missing limits can enable resource exhaustion against AD through:
- Expensive or unbounded queries
- Large searches that degrade DC performance
- Increased likelihood of availability-impacting denial-of-service (DoS)
This test helps ensure your directory query surface is bounded, making it harder for both accidental misconfigurations and malicious users to overwhelm AD.
Security Recommendationβ
- Set LDAP query policies to enforce practical limits aligned with your operational needs.
- Ensure policies are applied consistently across relevant directory contexts/partitions.
- Combine with access controls: even with good limits, ensure only authorized clients can perform heavy queries.
How the Test Worksβ
This test reads LDAP query policy configuration from AD and produces a count/visibility metric indicating where query policies are present and/or set according to your expected baseline.
Related Testsβ
Test-MtAdDefaultQueryPolicy- Validates the baseline LDAP query limits.
Test Metadataβ
| Field | Value |
|---|---|
| Test ID | AD-CFG-06 |
| Severity | Info |
| Suite | Active Directory |
| Category | AD.Config |
| PowerShell test | Test-MtAdLdapQueryPolicyCount |
| Tags | AD, AD-CFG-06, AD.Config |
Sourceβ
- Pester test:
tests/ad/config/Test-MtAdLdapQueryPolicyCount.Tests.ps1 - PowerShell source:
powershell/public/ad/config/Test-MtAdLdapQueryPolicyCount.ps1

