Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to create a common script to restart service:

net stop <service>
net start <service>

Problem is that I don't know the name of the service. For example for "printer spooler" is the name "spooler".

How can I find the name for any service?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

You can view a list of your Windows Services by following these steps:

  1. Right-click on the "Computer" icon (it's usually on your Windows Desktop or in the Start Menu)
  2. Select "Manage" (this requires Administrative access)
  3. Double-Click on "Services and Applications" (to expand it)
  4. Click on "Services"

The list on the right-hand side under the "Services" column shows all your services, sorted alphabetically by default.

enter image description here

Note: In addition to using the "Net" command, for manual control you can also use the GUI to Start/Stop many of the Windows Services that are available.

share|improve this answer
    
Yes, but there aren't its real names like spooler for printer spooler. I've found it in HKLM\System\CurrentControlSet\Services :) –  gaffcz Aug 24 '11 at 8:38
1  
You can use this command to show all of them ("REG QUERY /?" reveals full usage information), although output is a bit excessive: REG QUERY "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services" –  Randolf Richardson Aug 24 '11 at 8:59
3  
You can use the long names of the service so long as you put them in quotes it's just tedious. –  Col Aug 24 '11 at 9:07
3  
If you right click a service and choose properties The general tab shows the actual service name at the top. –  klennepette Aug 24 '11 at 13:23
add comment

Run services.msc to get a list of all the services.

Click properties on the service you want, there you can see the "service name" and the "display name".

The service name is what you need to use with the net command.

share|improve this answer
add comment

This handy guide from Black Viper lists down the name of the services which can be used with the "net start/stop" commands. He has lists for services included in Windows XP, Vista, Server 2008, and 7. For example, here's the list for Windows 7 SP1 (you may need to scroll a bit down for the actual table).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.