Tuesday 10 August 2021

How to create batch file to start and stop service ?

 Please follow below steps:-

1)Open notepad.

2)To start service type net start <Service Name> and save file as start.bat

e.g  MSSQL$SQLEXPRESS service



3)To stop service type net stop <Service Name> and save file as stop.bat


4)To run service, right click on batch file and select run as administrator.

    Service Started using .bat file:-


    Service stopped using .bat file:-



No comments:

Post a Comment