Nixon said:
I've googled around for this but can't really find a meaningful answer, so
I hope someone here will be able to help...
Is there some way of querying the Security Center for it's current status?
Perhaps via WMI or some registry keys? What I'd like to do is to `ask` the
SC "is the AV, patching, and firewall all OK in your opinion?", and have it
reply somehow that it's happy with it's current status.
Thanks in advance for any tips
Hi,
If I run the WMI based VBScript below on a computer that have a
recent version of Symantec Client Firewall (corporate edition)
installed, I get this output:
Company Name : Symantec Corporation
Display Name : Symantec Client Firewall
Enabled : True
enableUIParameters :
pathToEnableUI :
versionNumber : 8.6.0.80
On a WinXP SP2 computer with only the builtin firewall available,
I get nothing returned...
'--------------------8<----------------------
strComputer = "." 'Can set to remote machine.
Set oWMI = GetObject _
("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer _
& "\root\SecurityCenter")
Set colFirewall = objSWbemServices.ExecQuery _
("Select * From FirewallProduct")
For Each objFirewall In colFirewall
Wscript.Echo "Company Name : " & objFirewall.companyName
Wscript.Echo "Display Name : " & objFirewall.displayName
Wscript.Echo "Enabled : " & objFirewall.enabled
Wscript.Echo "enableUIParameters : " & objFirewall.enableUIParameters
Wscript.Echo "pathToEnableUI : " & objFirewall.pathToEnableUI
Wscript.Echo "versionNumber : " & objFirewall.versionNumber
Next
'--------------------8<----------------------
The output of the script below when having Symantec's
SAV CE 9.0.3 installed:
companyName: Symantec Corporation
displayName: Symantec AntiVirus Corporate Edition
enableOnAccessUIMd5Hash:
enableOnAccessUIParameters:
instanceGuid: {FB06448E-52B8-493A-90F3-E43226D3305C}
onAccessScanningEnabled: True
pathToEnableOnAccessUI:
pathToUpdateUI:
productUptoDate: True
updateUIMd5Hash:
updateUIParameters:
versionNumber: 9.0.3.1000
'--------------------8<----------------------
strComputer = "." 'Can set to remote machine.
On Error Resume Next
Set oWMI = GetObject _
("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer _
& "\root\SecurityCenter")
Set colItems = oWMI.ExecQuery("Select * from AntiVirusProduct")
If Err = 0 Then
For Each objAntiVirusProduct In colItems
WScript.Echo "companyName: " & objAntiVirusProduct.companyName
WScript.Echo "displayName: " & objAntiVirusProduct.displayName
WScript.Echo "enableOnAccessUIMd5Hash: " _
& objAntiVirusProduct.enableOnAccessUIMd5Hash
WScript.Echo "enableOnAccessUIParameters: " _
& objAntiVirusProduct.enableOnAccessUIParameters
WScript.Echo "instanceGuid: " & objAntiVirusProduct.instanceGuid
WScript.Echo "onAccessScanningEnabled: " _
& objAntiVirusProduct.onAccessScanningEnabled
WScript.Echo "pathToEnableOnAccessUI: " _
& objAntiVirusProduct.pathToEnableOnAccessUI
WScript.Echo "pathToUpdateUI: " & objAntiVirusProduct.pathToUpdateUI
WScript.Echo "productUptoDate: " & objAntiVirusProduct.productUptoDate
WScript.Echo "updateUIMd5Hash: " & objAntiVirusProduct.updateUIMd5Hash
WScript.Echo "updateUIParameters: " _
& objAntiVirusProduct.updateUIParameters
WScript.Echo "versionNumber: " & objAntiVirusProduct.versionNumber
Next
Else
Err.Clear
WScript.Echo "Unable to connect to SecurityCenter class on " _
& strComputer & "."
WScript.Echo " Error Number:" & Err.Number
WScript.Echo " Source:" & Err.Source
WScript.Echo " Description:" & Err.Description
End If
'--------------------8<----------------------