Hello ,
i need help with batch command. I would like to kill one process but on a lot of hosts. Single command is taskkill s/"hosname" /FI "precess.exe" but i want to kill same process on approx. 100 hosts.
Can anybody help me?
Batch taskkill
Moderator: DosItHelp
Re: Batch taskkill
Create a file with each hostname on a separate line.
Code: Select all
FOR /F "usebackq delims=" %%G IN ("hostnames.txt") DO taskkill /S "%%G" /IM "precess.exe"
Re: Batch taskkill
Perfect, it working. ThanksSquashman wrote: ↑01 Dec 2021 13:55Create a file with each hostname on a separate line.
Code: Select all
FOR /F "usebackq delims=" %%G IN ("hostnames.txt") DO taskkill /S "%%G" /IM "precess.exe"