AD-PWDPOL-01 - Password history count should be retrievable
Overviewโ
Password history is a critical security control that prevents users from reusing their recent passwords. Without adequate password history:
- Password cycling: Users can quickly cycle through passwords to return to their favorite (often compromised) password
- Compromised credential reuse: If a password is breached, users may inadvertently reintroduce it into the environment
- Weak compliance: Many compliance frameworks require password history to prevent password reuse
The recommended minimum of 24 remembered passwords ensures that users cannot reuse passwords within a reasonable timeframe, forcing them to create truly unique passwords.
Security Recommendationโ
Configure the password history count to at least 24 (Microsoft and CIS recommendation). This prevents users from reusing their last 24 passwords, significantly reducing the risk of password reuse attacks.
To configure this setting:
- Open Active Directory Domains and Trusts or Group Policy Management
- Navigate to the Default Domain Policy
- Edit: Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies > Password Policy
- Set Enforce password history to 24 or more
How the Test Worksโ
This test retrieves the default domain password policy using Get-ADDefaultDomainPasswordPolicy and extracts the PasswordHistoryCount value. The test reports:
- Current password history count
- Recommended minimum (24)
- Whether the configuration meets security best practices
Related Testsโ
Test-MtAdPasswordMaxAge- Checks maximum password ageTest-MtAdPasswordMinLength- Checks minimum password lengthTest-MtAdPasswordComplexityRequired- Checks if password complexity is enforced
Test Metadataโ
| Field | Value |
|---|---|
| Test ID | AD-PWDPOL-01 |
| Severity | Info |
| Suite | Active Directory |
| Category | AD.PasswordPolicy |
| PowerShell test | Test-MtAdPasswordHistoryCount |
| Tags | AD, AD-PWDPOL-01, AD.PasswordPolicy |
Sourceโ
- Pester test:
tests/ad/passwordpolicy/Test-MtAdPasswordHistoryCount.Tests.ps1 - PowerShell source:
powershell/public/ad/passwordpolicy/Test-MtAdPasswordHistoryCount.ps1

