This file contains hidden or 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
# Get CPU % including Virtual Machines local check | |
$cpucounter = (Get-Counter -Counter "\Prozessorinformationen(_total)\Privilegierte Auslastung").CounterSamples[0] | |
$value = $cpucounter.CookedValue.toString().Replace(',','.') -as [double] | |
$output = "P 'CPU Utilization (with VMs)' All=$value" | |
Write-Host $output "Total CPU (with VMs):" ([math]::Round($value,2)) |