Skip to content

Batch Script Net Stop and Net Start

Learn how to use net stop and net start commands in Windows batch scripts to control service status, including syntax and examples like stopping/starting the Print Spooler service.

These commands are used to stop and start a particular service.

Syntaxbatch
net start <service-name>
net stop <service-name>

Example

The following command is used to stop the printer spooler service.

net stop spooler
Outputplaintext
The Print Spooler service is stopping.
The Print Spooler service was stopped successfully.

The following command is used to start the printer spooler service.

net start spooler
Outputplaintext
The Print Spooler service is starting.
The Print Spooler service was started successfully.
Navigation