AD-USER-01 - Disabled user count should be retrievable
Overviewβ
Disabled user accounts are expected during offboarding, investigations, and staged deprovisioning. Tracking their volume helps identify stale objects that should be deleted, reduces directory clutter, and supports lifecycle governance.
Security Recommendationβ
Review disabled user accounts regularly and remove accounts that no longer need to exist. For retained accounts, document the business reason and expected retention period.
How the Test Worksβ
This test retrieves cached Active Directory user data from Get-MtADDomainState and counts user objects where Enabled = $false. The result includes total, enabled, and disabled user counts plus the disabled percentage.
Related Testsβ
Test-MtAdUserDormantEnabledCountTest-MtAdUserNeverLoggedInCountTest-MtAdUserPasswordNotRequiredCount
Test Metadataβ
| Field | Value |
|---|---|
| Test ID | AD-USER-01 |
| Severity | Info |
| Suite | Active Directory |
| Category | AD.User |
| PowerShell test | Test-MtAdUserDisabledCount |
| Tags | AD, AD-USER-01, AD.User |
Sourceβ
- Pester test:
tests/ad/user/Test-MtAdUserDisabledCount.Tests.ps1 - PowerShell source:
powershell/public/ad/user/Test-MtAdUserDisabledCount.ps1

