msdos kill process by name code example Example 1: script to kill a process in windows taskkill /PID 1234 Example 2: taskkill cmd taskkill /f /im Process_name.exe