Solved

Powershell to query CPU

Posted on 2014-02-22
3
891 Views
Last Modified: 2014-07-11
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
Comment
Question by:kbjijo
  • 2
3 Comments
 
LVL 51

Accepted Solution

by:
Netman66 earned 500 total points
ID: 39879540
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
 
LVL 51

Assisted Solution

by:Netman66
Netman66 earned 500 total points
ID: 39879552
Just a note for Server 2003; you may need this patch if it doesn't report correctly.

http://support.microsoft.com/kb/932370
0
 

Author Closing Comment

by:kbjijo
ID: 40190433
good
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to set permissions to allow a limited-permissions user to start and stop a particular System Service.   It is always best to give users only the permissions that they need to perform their job, so tweaking particular permi…
Have you ever had a hard drive that you can't boot into, but need to change the registry? Here is the solution! This article guides you through accessing and editing a registry of a non-primary drive. To read registry information on a non-prim…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now