I'm writing a script which clones volumes which are not being written to via cifs. I get the cifs write counter using the following line:
$cifs_ops = get-naperfdata -name volume -instances <volume name> -counters cifs_write_ops | select -expandproperty counters | select value
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?