Hi tdpoakg
First thank you for the reply, unfortunately this doesn't seem to work. Below is the query error.
Add-Member : The SecondValue parameter is not necessary for a member of type "NoteProperty" and should not be specified. Do not specify
the SecondValue parameter when adding members of this type.
At C:\scripts\Get-Cluster-Usage-Stats.ps1:61 char:1
+ Add-Member -pass NoteProperty "ClusterCPUUsageAverage" "{0:N1}" -f $sta ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Add-Member], InvalidOperationException
+ FullyQualifiedErrorId : Value2ShouldNotBeSpecified,Microsoft.PowerShell.Commands.AddMemberCommand
Script Update:
Add-Member -pass NoteProperty "ClusterCPUUsageAverage" "{0:N1}" -f $stat.average |
Add-Member -pass NoteProperty "ClusterCPUUsageMax" "{0:N1}" -f $stat.maximum |
Add-Member -pass NoteProperty "ClusterCPUUsageMin" "{0:N1}" -f $stat.minimum |
Johan