The Core Technologies Blog

Our Software // Windows Services // 24×7 Operation

Essential Tools for Windows Services: The NET Command

If you manage Windows Services and are comfortable working from the command line, then the Windows NET.EXE command should be in your toolkit. Use it to easily start, stop, pause or restart any service from an elevated DOS prompt, or in a convenient script/batch file.

Using NET to stop a Windows Service

To stop a service, run:

net stop <Service-Name>

where <Service-Name> is the name of the service. Be sure to enclose it in quotes if it contains a space!

For example, to stop the Print Spooler service (named “Spooler”), run:

net stop Spooler

Here is what it looks like on our Windows Server 2016 computer:

NET: Stopping the Print Spooler Service

Notice that the NET command will wait for the service to stop before continuing. The only exception is when the service is unresponsive or takes more than 30 seconds to comply.

Starting a Windows Service with NET

To start an idle Windows Service, run:

net start <Service-Name>

If all goes well, your service (and any other service it depends on to operate) will be started after a few seconds:

NET: Start the Print Spooler Service

How to Restart a Windows Service with NET.EXE

To restart a service, say from a batch file, chain the “net stop” and “net start” commands together like this:

net stop <Service-Name>
net start <Service-Name>

NET will also Pause and Resume Windows Services

Not all services support pause and resume, but if you have one that does, NET can come in handy there as well.

To pause a service, type:

net pause <Service-Name>

To resume a paused service, run:

net continue <Service-Name>

Posted in Windows Services | Tagged , , | 8 Comments

8 Responses to Essential Tools for Windows Services: The NET Command

  1. Art Wilmoth says:

    On using the NET command in a batch to restart I recommend adding time for the services to react. I’ve done this for one of my services that tends to hang. See below;

    @ECHO Stopping services, please wait for 10 seconds…

    REM Stop Service

    NET STOP ServiceNameHere

    REM The following is a timer to allow for server RAM to clear after the service has stopped
    REM Use the numerical value within the ‘timeout’ command line to control how many seconds the pause will be.


    NET START ServiceNameHere



  2. Sunny says:

    I have a query if I need to start the multiple services and those service is taking more than 30 seconds to come up then how can i achieve that as currently its failing with error “‘net’ timed out after 30 seconds”.

    Appreciate your early response. thanks

  3. Sean Sparks says:

    I need a script to test users ability to start a service. Multiple users on multiple servers. Can i do that with SC or NET commands?

  4. ctcadmin says:

    Though its results may be tricky to decipher, you can use the “SC SDSHOW” command to see the service’s security descriptor.

    If you don’t mind attempting to start the service, you can also use NET START and search for errors, as shown in the example on this page:

  5. Ajay says:

    sir net stop telnet how to use this cmd

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>