Controlling services from command line

Sunday, October 4, 2009 Leave a Comment

We normally use Services.msc to start or stop or disable or enable any service. We can do the same from command line also using net and sc utilities. Below are commands for controlling the operation of a service.

To stop a service from command prompt:

net stop servicename


To start a service from command prompt:

net start servicename

To disable a service from command prompt:

sc config servicename start= disabled

To reenable a service from command prompt:

sc config servicename start= demand

To make a service automatic from command prompt:

sc config servicename start= auto


Note: Space is mandatory after '=' in the above sc commands.


 

0 comments »

Leave your response!