question about script for check service status

  • Thread starter Thread starter FPL
  • Start date Start date
F

FPL

hi all,

Someone can tell me if is possible by script check if a service is stopped for a lot of computers?

i read about psservice or sc utility for do this but i don't know if is possible to use sc with nt machines.

Thansk.
 
for /f "tokens=2 delims=: " %i in ('psservice \\MACHINENAME query
iisadmin ^| findstr /c:"STATE"') do set test=%i

1 = stopped
4 = running
7 = paused
 
Back
Top