Task Manager is generally used to kill or end a process in Windows . This method is effective but not nearly as fun as killing a process in Command Prompt. And one more advantage of killing process using Command Prompt provides much more control and the ability to end multiple processes at once.
All of this is possible with the TaskKill command. You can kill a process by the process ID (PID) or by image name (EXE filename).
Open up an Administrative level Command Prompt and run tasklist to see all of the running processes:
Image Name PID Session Name Mem Usage
========================= ======== ================ ============
firefox.exe 26356 Console 139,352 K
regedit.exe 24244 Console 9,768 K
notepad.exe 24696 Console 22,028 K
notepad.exe 25304 Console 5,852 K
explorer.exe 2864 Console 72,232 K
cmd.exe 18664 Console 2,380 K
conhost.exe 2528 Console 7,852 K
In the example above you can see the image name and the PID for each process. If you want to kill the firefox process run:
C:\>Taskkill /IM firefox.exe /F
C:\>Taskkill /PID 26356 /F
The /f flag is kills the process forcefully.