I know this is a very old question, but just in case someone comes across this and needs an answer, you can get a list of services on the machine using the PerformanceCounterCategory class and get all instances.
var category = new PerformanceCounterCategory("ServiceModelService 3.0.0.0", "machine name");
var instances = category.GetInstanceNames();
foreach (var instance in instances)
{
Console.WriteLine(instance);
}
Jason source
share