Search code examples
powershellwmi

SecurityCenter WMI in Windows 8


Back in Windows 7 and older - I used a PowerShell script to access root\SecurityCenter or root\SecurityCenter2 in order to monitor AV/Anti-Spyware etc. via the Get-WMIObject cmdlet.

Now in Windows 8 onwards, this WMI Namespace no longer exists. I've done some research online I can't seem to find any alternative to easily access Action Center status for AV product, up-to-date status etc.

Does anyone know of anyway in Windows 8 to accces this info via PowerShell with similar results to old WMI method?


Solution

  • I'm pretty sure the WMI namespace root\SecurityCenter2 is still available in Windows 8.1, considering it's available in Windows 10 Tech Preview.

    PS > Get-WmiObject -Namespace root\securitycenter2 -Class antivirusproduct
    
    __GENUS                  : 2
    __CLASS                  : AntiVirusProduct
    __SUPERCLASS             : 
    __DYNASTY                : AntiVirusProduct
    __RELPATH                : AntiVirusProduct.instanceGuid="{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"
    __PROPERTY_COUNT         : 6
    __DERIVATION             : {}
    __SERVER                 : MY-PC
    __NAMESPACE              : ROOT\securitycenter2
    __PATH                   : \\MY-PC\ROOT\securitycenter2:AntiVirusProduct.instanceGuid="{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"
    displayName              : Windows Defender
    instanceGuid             : {D68DDC3A-831F-4fae-9E44-DA132C1ACF46}
    pathToSignedProductExe   : %ProgramFiles%\Windows Defender\MSASCui.exe
    pathToSignedReportingExe : %ProgramFiles%\Windows Defender\MsMpeng.exe
    productState             : 397568
    timestamp                : Sat, 24 Jan 2015 20:53:02 GMT
    PSComputerName           : MY-PC