Normally when it is required to know the one of the service status in the existing server means it is easy by from finding the result from the servicecontroller by pasted below code:
ServiceController sc = new ServiceController("servicename");
if ((sc.Status.Equals(ServiceControllerStatus.Stopped)) ||
(sc.Status.Equals(ServiceControllerStatus.StopPending)))
{
// Start the service if the current status is stopped.
sc.Start();
}
Here i would like to know the service status of another machine, how can i find out the result can any one able to guide me on this scenario.