Batch to check services on multiple computer

March 2, 2011 at 19:17:16
Specs: Windows 7
I am trying to write a batch file that check to see if a service is running on multiple computers. I have the computers listed in a text file.
This doesn't see to work:
FOR /F "Tokens=*"%%L in (Computers.txt) DO
(
SET ComputerName=
SET ComputerName=%%L
SC.exe \\!ComputerName! Query ServiceIamChecking > Results.txt
)

See More: Batch to check services on multiple computer

Report •


#1
March 2, 2011 at 20:06:17
Try:
FOR /F "Tokens=*" %%L in (Computers.txt) DO SC.exe \\%%L Query ServiceIamChecking >> Results.txt

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question