Needed to find what service account are being used by the scheduled tasks o my servers and came up with the following command line:

for /F %i in (Servers.txt) do SCHTASKS /query /v /FO CSV /nh /s %i >> tasks.csv

Leave a Reply