Do you guys have an general advice for using/troubleshooting the WMI test method? Here's my problem:
I've been working with another namespace 'root\SecurityCenter', that does not present itself in WMIExplorer. If it is present (not available on al machines/OS's) it's a great source of info for Firewall and AntiVirus status.
I could modify the VBScript snippet below to work, but it seems I should be able to use the HM's WMI test method to accomplish this.
Code: Select all
Option Explicit
On Error Resume Next
strComputer = "."
Set oWMI = GetObject( _
"winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\SecurityCenter")
Set colItems = oWMI.ExecQuery("Select * from AntiVirusProduct")
For Each objItem in colItems
With objItem
WScript.Echo "Company: " & .companyName
WScript.Echo "Product Name: " & .displayName
WScript.Echo "Version: " & .versionNumber
WScript.Echo "GUID: " & .instanceGuid
WScript.Echo "ScanEnabled: " & .onAccessScanningEnabled
WScript.Echo "ExePath: " & .pathToSignedProductExe
WScript.Echo "UserNotified: " & .productHasNotifiedUser
WScript.Echo "State: " & .productState
WScript.Echo "UptoDate: " & .productUptoDate
WScript.Echo "WscNotifications? " & .productWantsWscNotifications
End With
Next
' Note: Not all properties are available with all AV products.
![:x](./images/smilies/icon_mad.gif)
So, why do all namespaces not appear in WMI Explorer, even though they are present and can be queried?