I am trying to retrieve the Number of CPUs and Cores per CPU using Command Prompt. I have executed the following command:
wmic cpu get NumberOfCores, NumberOfLogic
You can use the environment variable NUMBER_OF_PROCESSORS for the total number of processors:
NUMBER_OF_PROCESSORS
echo %NUMBER_OF_PROCESSORS%