Scripting or programming the Performance Counters

It’s possible to connect to the Performance Counters of a remote machine and retrieve the values of the different counters. But when the local language is different than the one you are connecting to, it will present you the language of the categories and counters of the local machine:

So local machine language is Dutch and remote machine is English, the categories and counters are displayed in Dutch.

This is really annoying when scripting or programming.

You can change this behaviour by changing the CultureSet (vb.net):

‘Define constants
Const strApplicationCulture As String = “en-US”

‘Set the culture of this application to the specified culture
System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo(strApplicationCulture, False)

Ingmar Verheij & Daniel Nikolic