I've run into an issue where the counter value is persistent ie. CIFs copy finishes, counter value in terms of cifs ops = 8000+ when the share is no longer mounted and ops should be 0. Is there any way to force an update of the counter value through the PowerShell toolkit?
You're using a rate counter, which is a cumulative value, so to get the rate over a time interval you must sample the value twice (c1 & c2) at times t1 & t2, then use rate = (c2-c1)/(t2-t1). Or just take two successive samples a short time apart and ensure the counter value didn't change.
Or you can try Invoke-NaSysstat, which uses the same perf APIs and may provide a value that works in your case.