Image of How to stop/start windows service via batch or cmd

ADVERTISEMENT

Table of Contents

Introduction

This tutorial describes how to stop/start a windows service via batch or cmd.

1. Find service name

First of all, you need to get the service name, to do this:

  • Click windows -> type “services”
  • When the “services” window opens, right-click the desired service -> properties, then get the service name as below:

service window

2. Stop service

In order to stop the service via batch script:

  • Open cmd as administrator.
  • Run this command: NET STOP <SERVICE_NAME>

3. Start service

In order to start the service via batch script:

  • Open cmd as administrator.
  • Run this command: NET START <SERVICE_NAME>

Summary

This tutorial describes how to stop/start a windows service via batch or cmd.

Next Steps

If you're interested in learning more about the basics of Java, coding, and software development, check out our Coding Essentials Guidebook for Developers, where we cover the essential languages, concepts, and tools that you'll need to become a professional developer.

Thanks and happy coding! We hope you enjoyed this article. If you have any questions or comments, feel free to reach out to jacob@initialcommit.io.

Final Notes