i have a lot of windows servers
i want to check windows firewalls..
how can i check this ?
i can check windows firewall service..but this is not enough..i need to check windows firewall either "on" or "off"...
thnx and regards..
Hi,
A VBscript should do the trick. If you need to monitor it continuously, integrate the script into an APM Windows Script Monitor.
You will have to write a WMI script that will check the HNet_ConnectionProperties WMI Class which has the "IsFirewalled" variable set to True/False.
This WMI Class is in the root\Miscrosoft\HomeNet namespace (not in the root\cimv2 one).
To recognize which interface has which GUID, the HNet_Connection WMI Class is mandatory to do the mapping.
I found the information from that article: Check if Firewall is enabled on all LAN Connections using DCM Solution
HTH,
Yann
how can i do by using vbscript ?
i have a script that :
------------------------------------------------------------------------
clist = "computers.txt" Const FOR_READING = 1const HKEY_LOCAL_MACHINE = &H80000002const strKeyPath = "SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\"const strValueName = "EnableFirewall" Set objFSO = CreateObject("Scripting.FileSystemObject")If objFSO.FileExists(clist) Then Set objTextStream = objFSO.OpenTextFile(clist, FOR_READING)Else WScript.Echo "Input file " & clist & " not found." WScript.QuitEnd If Do Until objTextStream.AtEndOfStream strComputer = objTextStream.ReadLine On Error Resume Next Set oReg=GetObject( _ "winmgmts:{impersonationLevel=impersonate}!\\" &_ strComputer & "\root\default:StdRegProv") if err.number = 0 then oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue if dwValue <> 0 thenWScript.Echo strcomputer & " : " & "Enabled" else WScript.Echo strcomputer & " : " & "Disabled" end if else end ifLoop--------------------------------------------------------------------------------------
and written "localhost" in computers.txt
so how can i use this script ??
thnx a lot