Apr
17
2012

Command Line utility “sc” to manage windows services

If you have been working with Windows then you are aware of command line utility which can be run by going to RUN > type “cmd” and a black window open’s up, now you can do several activities using command lines, let’s take example of managing services. Microsoft provided a GUI for same as well which will open-up by typing “services.msc” in RUN window. Managing services using command line is simple and efficient as you can automate several tasks by saving commands in batch file and executing via scheduled jobs, like starting and stopping specific services for e.g. –net start telnet or –net stop telnet which will start or stop telnet service respectively.

 

Now, if you need to manage services of remote computer then there is a need of more powerful command line utility and Microsoft provides one such utility called sc, this utility can manage services on other computers and can list information about installed services. To manage services with sc, you should be aware of “Service Key Names”, which usually not the name displayed in Service Management Window, to get service key name you need to get list of installed services using sc utility as by executing query i.e. sc query

 

Please find some examples using sc,

 

Command to print list of all services: sc query

Print list of services installed on another computer: sc \otherhostname query

Restart telnet service on another host: sc \otherhostname telnet stop sc \otherhostname start

Query to get list if SC syntaxes: sc ?

 

Some more details about managing services,

cid:image001.jpg@01CD1CC5.27C37B70

cid:image002.jpg@01CD1CC5.27C37B70

Download PDF

Related Posts

About the Author: Nitin Garg

Indian born, trekker, biker, photographer, lover of monsoons... I love to blog the topics I research and find useful for self or online community to save time and energy :) Everything you read on my blog is my own personal opinion!

Leave a comment

Subscribe to this blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 263 other subscribers

Translate this blog!

EnglishFrenchGermanItalianPortugueseRussianSpanish

Calender

December 2020
M T W T F S S
« Nov    
 123456
78910111213
14151617181920
21222324252627
28293031  

View Post by Categories

%d bloggers like this: