title: How can I automate the Tasklist command on my workstation to check a specific process on X number of servers?
body: <p>I'm trying to check what the status is on my XenApp servers for the spoolsv.exe process. I've got the command down to run individually from my XP workstation, but can't seem to get it to iterate through a text file. Here's what I have so far, what will make this populate Servers X-XX on my CMD screen?</p>
  
  <pre><code>@echo off
  
  FOR /F "usebackq" %%G IN ("C:\Documents and Settings\userid\Desktop\Scripts\servers.txt") DO echo tasklist /S %%G /u domain\userid | find "spoolsv.exe"
  
  pause
  </code></pre>
  
  <p>I can't seem to get it to run correctly, and sometimes it will just pop up my servers.txt file in notepad and not even run. What am I missing?</p>