Hi,
I am still dealing with counters.
Just found out that to run for long time with counters saved locally on could be space consuming indeed.
Trying to filter from saving information about counters with zero value.
I though about following:
(Get-counter -Counter ((get-counter -listset Processor).Paths | Where-Object {
$_ -like "*"
} ) -SampleInterval 2 -MaxSamples 1)
| Where-Object {$_.CounterSamples.CookedValue -gt 0}
For some reason it is not working and I am still getting those with zero value.
It is strange, because when I am running same test on counters values only:
(Get-counter -Counter ((get-counter -listset Processor).Paths | Where-Object {
$_ -like "*"
} ) -SampleInterval 2 -MaxSamples 1).CounterSamples.CookedValue
| Where-Object {$_ -gt 0}
It is working as I intended.
What I did wrong here?
Thanks.