Hello,
After I have read few topic related to this problem I found this script:
$stat = "cpu.usage.average"
$entity = Get-Cluster
$start = (Get-Date).AddDays(-7)
Get-Stat -Entity $entity -Start $start -Stat $stat |
Group-Object -Property {$_.Entity.Name} |
Select Name,
@{N="CPU average";E={$_.Group | Measure-Object -Property Value -Average | Select -ExpandProperty Average}}
The problem is that I'm getting only 1 cluster in results and one of Vcenter have 2 cluster and second one 4 clusters.
Get-Cluster is showing correct numer and name for clusters.
I've already try to modify this code but nothing seems to work. A littel bit of help please?