Simple Service Check

Table of Contents

Simple Service Check

 

[source language=”vb”]

@echo off
<span style="line-height: 1.5em;">:start</span>

for /f %%I in (serverlistall.txt) do call :run %%I
goto :end
:run
echo %1
wmic /node:%1 service where StartMode="Auto" list brief > %1_before.txt
goto :eof

[/source]

 

[source language=”vb”]

fc %1_before.txt %1_after.txt /U /LB | findstr "Stopped" > %1_compare.txt

[/source]

Leave a Reply