The following namespace required: using System.ServiceProcess;//Instantiate the ServiceController object System.ServiceProcess.ServiceController sc = new System.ServiceProcess.ServiceController("Service_name"); Console.WriteLine(sc.Status); //You can verify the status if stopped or not like below if (sc.Status == System.ServiceProcess.ServiceControllerStatus.Stopped) { System.Console.WriteLine(); System.Console.WriteLine("Service_name service is stopped"); return; } // Stop the service sc.Stop(); // Start the service sc.Start();