Hi guys , i am fairly new with powercli , i am trying to get montly value of cpu contention, by my understanding with this script (get the script from this forum) i get the average of today (maybe i am wrong):
$Cluster = 'clustername'
$stat = 'cpu.latency.average'
$CPU_contention = (Get-Stat -Entity $esx -Stat $stat -Realtime -MaxSamples 1 | Measure-Object -Property Value -Average).Average
$CPU_contention='{0:N1}' -f $CPU_contention -replace ",","."
$CPU_contention
i think i must replace -Realtime for -Interval 7200 to get Historical Interval 3 , but i get the error that the hosts of the cluster doesen't have the cited statistics.
any hint , will be welcome
Martin