3
Answers

Checking Services on a Server

paul walker

paul walker

14y
2.9k
1

Hi,
Can someone help?  I need to write an application that will check whether a set of services are running on a server.  The application will check every 5 minutes.
I am aware of the ServiceController object that can check the status of a service, but what I want to do is check the all the services running under a specific 'Log On As', rather than hard-code the name of the service.
Does anyone know if there is an object that exposes the services as a collection so that I can write a foreach statement to check the services?
Thanks
Paul

Answers (3)