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?
this is what i m running now. 2 batch files and 1 text file.
get.bat
tasklist | findstr pmill.exe >> dc-01c$001.txt
run_get.bat
psexec @%1 -u administrator -p password -c "C:get.bat"
pclist.txt
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?
Hint plz!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…