Net stop force
Show 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 command prompt, or in a convenient script/batch file. Using NET to stop a Windows ServiceTo stop a service, run:
where For example, to stop the Print Spooler service (named Spooler), run:
Here is what it looks like on our Windows Server 2016 computer: 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 NETTo start an idle Windows Service, run:
If all goes well, your service (and any other service it depends on to operate) will be started after a few seconds: How to Restart a Windows Service with NET.EXETo restart a service, say from a batch file, chain the net stop and net start commands together like this:
NET will also Pause and Resume Windows ServicesNot 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:
To resume a paused service, run:
You may also like...Essential Windows Services: DcomLaunch / DCOM Server Process Launcher The Top 5 Reasons to Run Your Application as a Windows Service with AlwaysUp How to Use VNC to Remotely Access Session 0 (with Keyboard and Mouse!) |