In C# how do i query the list of running services on a windows server?

前端 未结 4 1558
我寻月下人不归
我寻月下人不归 2020-12-14 01:45

I want to query for a list of services running as a specific user on a remote machine and then check the health of each. I\'m building a custom console.

4条回答
  •  别那么骄傲
    2020-12-14 02:10

    You can use wmi for this (System.Management). You can also use ServiceController.GetServices().

提交回复
热议问题