Demonstration script that connects to and returns information about the Windows Firewall standard profile
Set objFirewall = CreateObject("HNetCfg.FwMgr")Set objPolicy = objFirewall.LocalPolicySet objProfile = objPolicy.GetProfileByType(1)Wscript.Echo "Firewall enabled: " & objProfile.FirewallEnabledWscript.Echo "Exceptions not allowed: " & objProfile.ExceptionsNotAllowedWscript.Echo "Notifications disabled: " & objProfile.NotificationsDisabledWscript.Echo "Unicast responses to multicast broadcast disabled: " & -objProfile.UnicastResponsestoMulticastBroadcastDisabled
This is a VB Script, this can be used by saving the file in .vbs file