How to kill or stop a process from command prompt in Windows 7

In order to kill a process in Windows 7, first you should get its process id. To get it from command prompt, type the following command;

netstat -ao

Instead of listing all processes, you can filter the process list by getting processes only in “listening” or “established” state as below;

netstat -ao | find /i “listening”

From the process list, find the process to be killed and note its id from the PID column. Using this process id, execute the following command in order to kill the process;

taskkill /f /pid <process-id>

More than one process can be killed in a single command by using multiple “/pid <pid>” pairs as below;

taskkill /f /pid <process1-id> /pid <process2-id> /pid <process3-id>

This entry was posted in Windows Security and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *