CN.txt - List of computernames
services.txt - list of services to check
for /f %%a in (CN.txt) do (
echo %%a >> Output.txt
for /f "tokens=*" %%b in (services.txt) do (
sc \\%%a query "%%~b" >> Output.txt
How do I clean this script up to only show the Service_Name and state?