How to get the list of all Windows Services running in Machine

If you want the list of all the Windows Services running on your machine you can use GetServices() method of ServiceController class. Please note that you have to add the reference of System.ServiceProcess namespace in your project.

ServiceController[] services = ServiceController.GetServices();



About author

User avatar

Waqas Anwar

Founder of, Senior Consultant, Microsoft .NET and Web Technologies