尝试从WMI的“Win32_Processor”类获取“NumberOfEnabledCore”值时出现“未找到”错误 [英] Error occured “Not Found” while trying to fetch “NumberOfEnabledCore” value from “Win32_Processor” class of WMI

查看:188
本文介绍了尝试从WMI的“Win32_Processor”类获取“NumberOfEnabledCore”值时出现“未找到”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试提取" NumberOfEnabledCore "
值来自"
Win32_Processor "
类WMI。当我执行"
Get-WmiObject -class Win32_Processor |选择* "在Powershell中的
 
Windows 8.1
我收到错误"未找到"。但是,当我在 
运行相同的脚本时 Windows 10
我获得了"NumberOfEnabledCore"的价值。有人可以协助这个WMI脚本行为吗?


参考: https://msdn.microsoft.com/en-us/library/aa394373(v = vs.85).aspx


根据参考链接,我很困惑是否" NumberOfEnabledCore " Windows 8.1
支持,如果不支持,我如何提取" NumberOfEnabledCore " Windows 8.1操作系统的价值?



谢谢。


解决方案

Windows 8.1不支持


文档很清楚,在Win 10和Win Server 2016 Tech Preview之前的OS版本上不支持该属性。


来自MSDN -


Windows Server  2012  R2,Windows  8.1,Windows Server  2012,Windows  8,Windows Server  2008  R2, Windows  7,Windows Server  2008和Windows    
Windows Server  2016 Technical Preview和Windows  10之前不支持此属性。


I am trying to extract "NumberOfEnabledCore" value from "Win32_Processor" class of WMI. When I have executed "Get-WmiObject -class Win32_Processor | Select *" in Powershell in Windows 8.1, I am getting error as "Not Found". However, when I ran the same script in Windows 10, I am getting value for "NumberOfEnabledCore". Can someone please assist on this WMI script behavior?

Ref:https://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx

As per reference link, I am confused whether "NumberOfEnabledCore" is supported in Windows 8.1 and if not how can I extract "NumberOfEnabledCore" value with Windows 8.1 OS?

Thanks.

解决方案

Its not supported in Windows 8.1

The docs are quite clear that the property is not supported on OS versions prior to Win 10 and Win Server 2016 Tech Preview.

From MSDN -

Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, and Windows Vista:  This property is not supported before Windows Server 2016 Technical Preview and Windows 10.


这篇关于尝试从WMI的“Win32_Processor”类获取“NumberOfEnabledCore”值时出现“未找到”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆