How to restart a Windows service using command line

Situation: The client has Barracuda backup. It keeps having problem and needs to restart some services. This article shows how to create a batch file command to restart those service.

We will create a batch file including use net stop [service name] to stop the services and then net start [service name] to start them up again.

  1. Find the service name.

2. Find the Service name, for example, Barracuda Backup Agent’s Service name is bbagent.

3. Try these commands and make sure they are working.

net stop bbagent

net start bbagent

4. Now, create a batch file these commands:

net stop bbagent

net start bbagent

5. Create Scheduler task to run the batch file.

Published by

Bob Lin

Bob Lin, Chicagotech-MVP, MCSE & CNE Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com