Soldato
I am trying to pull together some license consumption statistics where there are multiple license entries for each license type which need to be summed.
First part gives me:
However, I'm struggling to then call each properties sum separately from this array.
Ultimately I'm trying to get it into a format recongised by the rrdtool e.g.
I'm almost there ...
Cheers, Paul.
First part gives me:
Code:
$usagetot = ($licensePool | where-object {$_.License -like "License Type"} | measure Count ,InUseCount, PooledAvailable,Overdraft -sum)
Outputs ...
Count : 2
Average :
Sum : 925
Maximum :
Minimum :
Property : Count
Count : 2
Average :
Sum : 560
Maximum :
Minimum :
Property : InUseCount
Count : 2
Average :
Sum : 365
Maximum :
Minimum :
Property : PooledAvailable
Count : 2
Average :
Sum : 0
Maximum :
Minimum :
Property : Overdraft
However, I'm struggling to then call each properties sum separately from this array.
Ultimately I'm trying to get it into a format recongised by the rrdtool e.g.
Code:
$unixtime = [int][double]::Parse($(Get-date -date (Get-Date).ToUniversalTime()-uformat %s))
Something then like -
$cmd = " rrdtool update rrdtooldb $($unixtime):$($usagetot.Count.sum):$($usagetot.InUseCount.sum):$($usagetot.PooledAvailable.sum):$($usagetot.Overdraft.sum)"
which would then output like ...
rrdtool update rrdtooldb 1530260250:925:560:365:0
Cheers, Paul.