NUMBER_OF_PROCESSORS env var incorrect on Dell PowerEdge Gen14 With Windows Server 2012 R2

Solution 1:

NUMBER_OF_PROCESSORS cannot indicate more than 64 processors, as that's the plain limit with 64-bit Windows.

Windows uses processor groups to manage more than 64 processors, see

The NUMBER_OF_PROCESSORS ENV variable is just one way to indicate to software what processing resources are around. With node interleaving disabled, the OS tries to prevent overloading by indicating just physical core. With node interleaving enabled, it tries to indicate SMT threading, but fails for the sheer size. "64" is the hard limit for this "API". The variable is pretty low grade anyway as it's intended for batch scripting and such.

There are more reliable and more detailed ways to find out about the CPU setup, which is what other tools use. You could try with Powershell (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors, possibly that's more precise.