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:4736
# The Smart Card Removal Policy service must be configured to automatic.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# Verifies the Smart Card Removal Policy service startup type is Automatic
# wmi_object (wmi_test)
function test_1 {
return (((Get-CimInstance -Namespace 'root\cimv2' -Query 'SELECT startmode FROM Win32_Service WHERE name=''SCPolicySvc''' | Select-Object -First 1) | Select-Object -ExpandProperty 'startmode') -eq 'Auto')
}
if (test_1) {
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 ms_windows_2012_and_2012_r2_dc target this check assesses.
# OVAL Definition: oval:mil.disa.fso.windows:def:4736
$service = Get-CimInstance -ClassName Win32_Service -Filter "Name='SCPolicySvc'"
if ($service -and $service.StartMode -eq 'Auto') { Write-Output "PASS"; exit 0 } else { Write-Output "FAIL"; exit 1 }