The reconstructed evaluation script behind this rule's OVAL check(s) — every module a compound check combines, with this rule's own concrete values and DISA's SCC tool's real per-module mechanism curated from static teardown of SCC releases.
# Windows PowerShell
# Reconstructed from oval:mil.disa.fso.windows:def:106
# Lockout duration does not meet minimum requirements.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# Tests if account lockout duration is forever,option1
# lockoutpolicy_object (lockoutpolicy_test)
function test_1 {
return ((((net accounts | Select-String 'Lockout duration') -replace '[^0-9]','') -le 0) -or (((net accounts | Select-String 'Lockout duration') -replace '[^0-9]','') -eq 4294967295))
}
# checks account lockout threshold policy setting is not equal to 0
# lockoutpolicy_object (lockoutpolicy_test)
function test_2 {
return (((net accounts | Select-String 'Lockout threshold') -replace '[^0-9]','') -ne 0)
}
if ((test_1 -and test_2)) {
Write-Output "PASS"
} else {
Write-Output "FAIL"
} Assessment Script Powered by AISyntax-verified
A standalone PowerShell script to assess this control automatically. Review before running it in your environment.
Syntax-checked as valid PowerShell. Not executed here — running it for real needs the actual windows_vista target this check assesses.
# OVAL Definition: oval:mil.disa.fso.windows:def:106
$lockoutPolicy = Get-CimInstance -ClassName Win32_LocallyDefinedAccountLockoutPolicy
if ($lockoutPolicy -and $lockoutPolicy.LockoutDuration -ne 0 -and $lockoutPolicy.LockoutThreshold -ne 0)
{
if ($lockoutPolicy.LockoutDuration -ge 30)
{
Write-Output "PASS"; exit 0
}
}
Write-Output "FAIL"; exit 1