Inventory WindowsFirewall policy
Ken Lutz forwarded me this mof edit that he's using; it reads and reports on a registry key:
// <:[-<>>>>>>>>>>>>>>>>>>>>>>>>>>>-Windows Firewall-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>-]:>
// Contributed by Ken Lutz
// If ConfigMgr, this section goes in configuration.mof
#pragma namespace( "\\\\.\\root\\cimv2" )
#pragma deleteclass("Win32_WindowsFirewallStatus", NOFAIL)
[
dynamic,
provider("RegProv"),
ClassContext("local|HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall")
]
class Win32_WindowsFirewallStatus
{
[key]
string Component = "Windows Firewall Status";
[PropertyContext("EnableFirewall")]
uint32 Enabled;
};
// if ConfigMgr, this section goes in sms_def.mof
#pragma namespace( "\\\\.\\root\\cimv2\\sms" )
#pragma deleteclass("Win32_WindowsFirewallStatus", NOFAIL)
[
SMS_Report(TRUE),
SMS_Group_Name( "Windows Firewall Status" ),
SMS_Class_ID( "MICROSOFT|WindowsFirewallStatus|1.0" )
]
class Win32_WindowsFirewallStatus : SMS_Class_Template
{
[ SMS_Report( TRUE ), key ] string Component;
[ SMS_Report( TRUE )] uint32 Enabled;
};
// <:[-<>>>>>>>>>>>>>>>>>>>>>>>>END>>-Windows Firewall-<<END<<<<<<<<<<<<<<<<<<<<<<<<<>-]:>