security center

L

lucbft

hello,

In security center, there is a green or red light informing the status of
the health of the computer.
I 'd like to know if it is possible to read this information in the registry
to make a report of my PCs.

Thank's
 
D

Doug Knox - [MS-MVP]

No, but you can query the PC's via WMI (Windows Management Instrumentation)
scripting. The below script is for the local computer, and would need to be
modified to determine all PC's on your network/domain and then query each
computer individually and report when there is a problem. Also a search for
'WMI scripting security center' will yield more information.

From:
http://www.scriptinganswers.com/Archive/articles/WMIandWindowsSecurityCenter.htm

' for non - MS firewall and FW with vendor WMI support.

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


'For virus use this query

Set colFirewall = objSWbemServices.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



--
Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart
Display\Security
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top