Friday, August 20, 2010

Start or stop Windows service from command line

REF: http://www.windows-commandline.com/2010/08/start-stop-service-command-line.html

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

2 comments:

  1. Hi, I am the owner of the blog mentioned in the post. Firstly, thanks for mentioning the reference. But I do not think it adds any value to post the same content again in your blog. There is also a chance of your blog getting low in search results because of duplicate content.

    I hope you agree with me. I request you to delete this content from your blog.

    best wishes.

    ReplyDelete
  2. Hi...this blog is not for anyone but myself...i only ref so i can find it later.. i then retype so i can find it faster..and maybe you delete this post in the future... i do not care about traffic or ads or what not... sorry if i broke any blogesphere rules.... i hope this is ok now,,, THX!!!

    ReplyDelete