I know how to delete a Performance Category; which then also deletes all of the counters inside that Category, but how do you delete a single Counter within a Category in C# (without hacking the registry)?
When you run a Data Collector Set, the data that is collected for performance counters is stored to a log file (. blg) in the location that was defined when the Data Collector Set was created. In Windows Performance Monitor, you can view log files to see a visual representation of performance counter data.
Follow the steps below to attempt this fix: Run Command Prompt as Administrator (right-click Command Prompt; select "Run as Administrator") Enter the following command then press enter: lodctr /r. Enter the following command then press enter: winmgmt.exe /resyncperf.
From what I've read on Performance Counter Categories, you can't delete or add performance counters to a custom category after it is created. You need to delete and recreate the category or create a new one. There is some information regarding altering categories at this MSDN page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With