回到Windows7及更高版本,我使用PowerShell脚本访问root\SecurityCenter或root\SecurityCenter2,以便通过Get-WMIObject cmdlet监视AV/反间谍软件等。
现在,在Windows 8之后,这个WMI命名空间不再存在。我在网上做了一些研究,我似乎找不到任何替代方法来轻松地访问AV产品的Action Center状态、最新的状态等等。
有没有人知道在Windows 8中通过PowerShell获取这一信息,其结果与旧的WMI方法相似?
发布于 2015-01-25 19:29:17
我确信WMI命名空间root\SecurityCenter2在Windows8.1中仍然可用,考虑到它在Windows10TechnologyPreview中是可用的。
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-PChttps://stackoverflow.com/questions/28112084
复制相似问题