更新时间:2022-10-17 13:26:08
To perform remote administration functions, usually, the right answer is to use WMI.
Win32_Process
class for process information.Win32_Service
class for services.And using types in System.Management
to interact with WMI from .NET. This page includes a simple example.
I would suggest using WMI for both remote and local information—avoiding two sets of code to maintain.