title: How can I get the number of CPU cores in Powershell?
body: <p>Suppose I'm running a (power)shell on a Windows machine.</p>
  <p>Is there a one-liner I could use to get:</p>
  <ol>
  <li>The number of physical processor cores and/or</li>
  <li>The max number of in-flight threads, i.e. cores * hyper-threading factor?</li>
  </ol>
  <p>Note: I want just a single number as the command output, not any headers or text.</p>