There seems to be a bit of a debate on the internet about this one. I executed the following PowerShell command on 2 different computers:
Get-WMIObject Win32_ComputerSystem | FL *
I executed it on a laptop with 1 physical processor with 4 logical processors and received the following results:
I then executed it again on a desktop with 1 physical processor and 8 logical processors:
From my testing, the NumberOfProcessors property seems to provide the correct number of physical processors.
I got curios and ran that PowerShell code on a virtual machine with 1 assigned processor:
I also ran it on a virtual machine with 4 processors assigned to it:
OK, so how do you know if you are looking at a virtual machine or a physical machine? A couple of properties higher in the list you will see Model. If this was a virtual machine, it would say Virtual Machine.
Comments
---
$myArray = @()
$myArray += get-wmiobject win32_processor
$myArray.Count