Measure-Object -sum all counterSamples from continuous get-counter
问题 I am trying to write a PowerShell script that will continuously poll a performance counter every N seconds then sum the values returned by the counter. My end goal is to have results for a dozen or so counters get rolled up and shipped off to a Graphite server for monitoring and reporting. so far this is what I have cobbled together for a particular counter, i'm just not sure how to get a couple of things in the land of PowerShell magic voodoo. I can't figure out how to get the Job ID as an