question about script for check service status


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.
 
Ad

Advertisements

Z

Zoidberg

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

1 = stopped
4 = running
7 = paused
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top