Get Total Number of Cores from a computer WITHOUT HyperThreading
suggested command does not work on computer with mote than 64 logical cores
(Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
provide number of logical cores (HT cores)
You can use Get-ComputerInfo
and scope to the property you want.
$processor = Get-ComputerInfo -Property CsProcessors$processor.CsProcessors
That should give you something like
Name : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHzManufacturer : GenuineIntelDescription : Intel64 Family 6 Model 78 Stepping 3Architecture : x64AddressWidth : 64DataWidth : 64MaxClockSpeed : 2808CurrentClockSpeed : 2607NumberOfCores : 2 <== that oneNumberOfLogicalProcessors : 4 ……
Then, just look for NumberOfCores
in the results.
If I understand you correctly, this vbscript will give you both. Powershell method - https://blogs.technet.microsoft.com/heyscriptingguy/2011/09/26/use-powershell-and-wmi-to-get-processor-information/
On Error Resume NextConst wbemFlagReturnImmediately = &h10Const wbemFlagForwardOnly = &h20Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2")Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL",wbemFlagReturnImmediately + wbemFlagForwardOnly)For Each objItem In colItems WScript.Echo "NumberOfCores: " & objItem.NumberOfCores WScript.Echo "NumberOfLogicalProcessors: " & objItem.NumberOfLogicalProcessorsNext
Powershell may provide a better report layout if the server contains multiple physical processors.
Get-WmiObject –class Win32_processor | ft systemname,Name,DeviceID,NumberOfCores,NumberOfLogicalProcessors