CPU Informationen
Aus Wiki-WebPerfect
-> This function/script is moved to GitHub!
CPU (Anzahl CPUs, Cores, logische Prozessoren)
Function Get-CPUNumber ($Node) { $CPUProperty = "NumberOfCores","NumberOfLogicalProcessors" $NumberOfCPUs = (Get-WmiObject -class win32_processor -computername $Node).Count $NumberOfCores = (Get-WmiObject -class win32_processor -computername $Node -Property $CPUProperty).NumberOfCores | select -First 1 $NumberOfLogicalProcessors = (Get-WmiObject -class win32_processor -computername $Node -Property $CPUProperty).NumberOfLogicalProcessors | select -First 1 $obj1 = new-object PSObject -Property @{"Number of CPUs"="$NumberOfCPUs";"Number of Cores/CPU"="$NumberOfCores";"Number of logical Processors/CPU"="$NumberOfLogicalProcessors"} $obj1 | select "Number Of CPUs", "Number of Cores/CPU", "Number of logical Processors/CPU" | Format-List }