4

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?

3 Answers 3

5

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.

4
  • Yes, but there aren't its real names like spooler for printer spooler. I've found it in HKLM\System\CurrentControlSet\Services :)
    – gaffcz
    Commented Aug 24, 2011 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" Commented Aug 24, 2011 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
    Commented Aug 24, 2011 at 9:07
  • 3
    If you right click a service and choose properties The general tab shows the actual service name at the top. Commented Aug 24, 2011 at 13:23
3

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.

1

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).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .