How to find the number of physical and logical CPUS?

How to find the number of physical and logical CPUS?

INTERVIEW PREPARATION IN 30 MINs – Read Following wires for a quick interview preparation.

  1. SQL Server DBA “Interview Questions And Answers”
  2. SQL Azure Interview Questions and Answers Part – 1
  3. SQL Azure Interview Questions and Answers Part – 2
  4. Powershell Interview Questions and Answers

Following is the small PS code to find out the number of physical and logical CPUs.

$System = gwmi -computer $server -class win32_computersystem -ErrorVariable MyError -ErrorAction Silentlycontinue
$cpuNumber = $System.NumberOfProcessors
$cpuName = $System.NumberOfLogicalProcessors

Regards,
Online POWERSHELL Classes @ http://tuitionaffordable.webstarts.com

Author: tuitionaffordable

Making tuition affordable for all the students on the planet.

2 thoughts on “How to find the number of physical and logical CPUS?”

Leave a comment