Created
March 26, 2014 17:11
-
-
Save davidgrenier/9788312 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "System.Management" | |
open System.Management | |
do | |
use ma = new ManagementObjectSearcher("Select * from Win32_Processor") | |
for item in ma.Get() do | |
try | |
printfn "%A" item.["NumberOfCores"] | |
with _ -> () | |
do | |
use ma = new ManagementObjectSearcher("Select * from Win32_ComputerSystem") | |
for item in ma.Get() do | |
try | |
printfn "%A" item.["NumberOfLogicalProcessors"] | |
with _ -> () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment