用WMI来查询CPU的频率,一直没问题:

"Select MaxClockSpeed From Win32_Processor Where ProcessorType = 3"

结果今天在一台虚拟机上发现无法查询了,于是乎在Powershell里查询了一下

Get-WmiObject –Class Win32_Processor

VirtualBox创建VM结果ProcessorType是空的

看看,ProcessorType是空的,Σ( ° △ °|||)︴

坑爹啊,VMWare创建的就没问题,ProcessorType是3.

 

ProcessorType

Data type: uint16
Access type: Read-only

Primary function of the processor.

Value Meaning

1 (0x1) Other
2 (0x2) Unknown
3 (0x3) Central Processor
4 (0x4) Math Processor
5 (0x5) DSP Processor
6 (0x6) Video Processor

参考资料:

 

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

 

相关文章:

  • 2021-04-25
  • 2021-06-10
  • 2021-11-20
  • 2022-01-08
  • 2021-08-01
  • 2021-09-04
猜你喜欢
  • 2021-10-29
  • 2022-12-23
  • 2021-10-13
  • 2021-11-21
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案