How to remotely control a Windows Service with ServiceController?
问题 I'm trying to control Windows Services that are installed in a remote computer. I'm using the ServiceController class. I have this: ServiceController svc = new ServiceController("MyWindowsService", "COMPUTER_NAME"); With this, I can get the status of the Windows Service like this: string status = svc.Status.ToString(); But I can't control the Windows Service (by doing svc.Start(); or svc.Stop(); ). I get the following exception: Cannot open Servicexxx service on computer 'COMPUTER_NAME' That