I am trying to pull monthly averages for my clusters and I ran into a snag with my first bit of code. Looks like my script is hanging at
$cpumax=Get-Stat -Entity $cluster -Start $start -MaxSamples 1 -Stat cpu.usage.average
Any help would be much appreciated
$start = (Get-Date).AddMonths(-1) Get-Cluster |Select -Last 2 |Foreach-object { $cluster=$_ $cpumax=Get-Stat -Entity $cluster -Start $start -MaxSamples 1 -Stat cpu.usage.average $cluster.Name $cpumax }