title: how to get a pc list that have a service running on each pc?
body: <p>I m using psexec to auto run from cmd on all PCs on our network to check if certain process is running or not. but i wannt a list with all pc name that has the service running on. how can i do it from powershell?</p>
  
  <p>this is what i m running now. 2 batch files and 1 text file.</p>
  
  <p>get.bat</p>
  
  <hr>
  
  <p>tasklist | findstr pmill.exe >> dc-01\c$\0001.txt </p>
  
  <hr>
  
  <p>run_get.bat</p>
  
  <hr>
  
  <p>psexec @%1 -u administrator -p password -c "C:\get.bat"</p>
  
  <hr>
  
  <p>pclist.txt</p>
  
  <hr>
  
  <p>what i got from this in result are just all pmill.exe , i m wondering if there is anyway that i can output the PC name that has pmill.exe running on?</p>
  
  <p>Hint plz!</p>