Hi for all!
Very simple script:
$entities = Get-VMHost esx-01
$stat = "cpu.usage.average"
$start = (Get-Date).AddDays(-4)
Get-Stat -Entity $entities -Stat $stat -Start $start |
Select @{N='ESXi';E={$_.Entity.Name}},Timestamp,Value |
Sort-Object -Property Timestamp
Works fine, but I get a lot of value.
What needs to be added to the script to get 4 lines, with average values per day?