Hi all..
i need to check windows firewall (disable or enable)..
so i write a vb script that:
------------------------------------------------------------------------------------------------------------------------
Const FOR_READING = 1
const HKEY_LOCAL_MACHINE = &H80000002
const strKeyPath = "SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\"
const strValueName = "EnableFirewall"
strComputer = "localhost"
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 then
WScript.Echo "Statistic: 0"
else
WScript.Echo "Statistic: 1"
end if
else
end if
------------------------------------------------------------------------------------------------------------------
this script returns localhost..but i want to need all of windows servers...
i added a windows script monitor in apm. and then used this script..but this script returned to me firewall of server installed solarwinds..i need firewall information of each other servers...