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