Sometimes PowerShell is not available, not wanted, or simply not the right choice for a quick check. In those cases, a batch script can still do a practical job: verify whether important services are running, restart them if necessary, and log each failure with a timestamp.
This example shows how to monitor a small set of services, but it can easily be expanded to include more entries. It is also suitable for running as a scheduled task several times per day, which makes it a simple lightweight monitoring option for older systems or minimal environments.
How the script works
The script first writes all currently running services into a text file by using net start. That output is then used as the basis for the checks that follow. Each service name is searched in the file, and if the service is not found, the script assumes it is not running.
If a service is missing, the script starts it again with net start "Service Name". At the same time, the event is written to failure.txt together with the current date and time. The log file is appended to, not overwritten, so every failure remains documented. The service list file, on the other hand, is recreated each time the script runs.
Script example
@echo off
REM --- save all running services in service.txt ---
net start > services.txt
REM ------------- check if service #1 (Designs) is running --------------
find "Designs" services.txt
if errorlevel 1 goto DEAD1
if errorlevel 0 goto OK1
:DEAD1
REM --- Restart service - log date and time ---
echo Designs %date% %time% >> failure.txt
net start "Designs"
goto OK1
REM ---------------------------------------------------------
:OK1
REM ------------- check if service #2 (Windows Update) is running --------------
find "Windows Update" services.txt
if errorlevel 1 goto DEAD2
if errorlevel 0 goto OK2
:DEAD2
REM --- Restart service - log date and time ---
net start "Windows Update"
echo Windows Update %date% %time% >> failure.txt
goto OK2
REM ---------------------------------------------------------
:OK2
REM ------------- check if service #3 (Windows Update) is running --------------
find "Citrix Broker Service" services.txt
if errorlevel 1 goto DEAD3
if errorlevel 0 goto OK3
:DEAD3
REM --- Restart service - log date and time ---
net start "Citrix Broker Service"
echo Citrix Broker Service %date% %time% >> failure.txt
goto OK3
REM ---------------------------------------------------------
:OK3
goto END
:ENDWhat the script does well
This approach is not as flexible as PowerShell, but it works reliably for simple service checks. It is easy to understand, easy to schedule, and does not require advanced scripting knowledge. For environments where batch files are still commonly used, that can be enough.
Another advantage is the logging. Because every failure is written to failure.txt with a date and time, it becomes easier to spot repeated service outages or unstable systems.
Things to keep in mind
This method depends on the exact service names being listed correctly in the script. If the service name changes or contains unexpected output text, the check may not work as intended. It is also worth noting that this version checks the net start output rather than querying the service state directly, so it is best suited for straightforward use cases.
Even so, for small admin tasks or legacy systems, this is a practical and fast solution.
Conclusion
A batch script like this is a simple way to monitor a few Windows services without using PowerShell. It stores the list of running services, checks for specific service names, restarts missing services, and keeps a log of failures over time.
For lightweight scheduled checks, that makes it a useful and easy-to-maintain option.