I want to write a console or Click Once WinForms app that will programmatically stop and/or start a windows service on a remote box.
Both boxes are running .NET 3.5
You can also do this from a command console using the sc command:
sc
sc start [service name] sc stop [service name]
Use
sc query | find "SERVICE_NAME"
to get a list of service names.
The option has the form \\ServerName
\\ServerName
sc \\MyServer stop schedule will stop the Scheduler service.
sc \\MyServer stop schedule