Checks if a Group Policy configures the computer to enable the domain profile for Windows Firewall. The domain profile applies to networks where the host system can authenticate to a domain controller. Some auditors requires that this setting is configured by a Group Policy.
Create or edit a configuration profile with the following information:
Create or edit the following script and configure it to run when the check fails:
Use the policy below to verify:
SELECT 1 FROM registry WHERE path LIKE 'HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\WindowsFirewall\DomainProfile\EnableFirewall' AND CAST(data as integer) = 1;
$regPath = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile'
$value = (Get-ItemProperty -Path $regPath -Name 'EnableFirewall' -ErrorAction SilentlyContinue).EnableFirewall
if ($value -eq 1) {
Write-Output 1
} else {
Write-Output 0
}
PowerShell commands are currently work in progress, contributions welcome.