[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1206
  • Last Modified:

Powershell to query CPU

Hi,

I'm trying to query the total number of physical processors on 2003/2008 machines using wmi.

Problem:  Total processor is listing as total virtual processor due to Hyper Threading

1- How to get total Socket & Total Cores in W2k3 & W2k8
2 - How to find if HT is enabled or not
0
kbjijo
Asked:
kbjijo
  • 2
2 Solutions
 
Netman66Commented:
Should work for physical and logical processors.

Get-WMIObject Win32_ComputerSystem | Format-List Name, NumberOfProcessors, NumberOfLogicalProcessors


As for Hyperthreading, if the Logical Processor count is higher than the Cores, then HT is enabled.

Get-WMIObject Win32_Processor | Format-List Name, NumberOfLogicalProcessors, NumberOfCores
0
 
Netman66Commented:
Just a note for Server 2003; you may need this patch if it doesn't report correctly.

http://support.microsoft.com/kb/932370
0
 
kbjijoAuthor Commented:
good
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now