Jeffrey Hicks has an improvement to Get-Counter in Powershell:
I wanted to tell you about another addition to the latest release of the PSScriptTools module. This is something I’ve written about before but I decided to add the function to the module. I hope you find it a much easier way to work with performance counters. And it works in Windows PowerShell and PowerShell 7.x.
Click through to see what has changed.