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<<<<<<<<<<<<<<<<<<<<<<<<<>-]:>

Published Tuesday, April 22, 2008 12:56 AM by skissinger
Filed under:

Comments

# re: Inventory WindowsFirewall policy

Any mofcomping is needed on the user side?

if so, will be the same file?

Wednesday, August 13, 2008 3:43 AM by gkamenjati

# re: Inventory WindowsFirewall policy

If you are ConfigMgr, there is no longer any need to mofcomp.  If you are SMS2003, yes, you will want to mofcomp this snippet, or at a minimum the Data section.

Wednesday, August 13, 2008 8:17 AM by skissinger