Here I wrote an example command that you can paste in your cmd
command line prompt and is written for chrome.exe
.
FOR /F "tokens=2 delims= " %P IN ('tasklist /FO Table /M "chrome*" /NH') DO (TASKKILL /PID %P)
The for just takes all the PID
s listed on the below tasklist
command and executes TASKKILL /PID
on every PID
tasklist /FO Table /M "chrome*" /NH
If you use the for in a batch file just use %%P instead of %P