Networking HowTos
Networking HowTos

Kill a process from the command line on windows

April 8, 2012 Microsoft, Windows

There may be times when you want to close a process from the command line on a Windows machine. The ‘taskkill’ command allows you to kill processes/programs by process id or exe name (image name).
You can do the same thing from the windows task manager, but sometimes this is not suitable. For example, if you have a number of Internet Explorer windows open, they will each run under their own process. If using the task manager, you have to kill each process separately. With taskkill you can specify to kill the exe/image name ‘iexplore.exe’ and it will terminate all instances of that process.
Example taskkill command:

taskkill /f /im iexplore.exe

/f = Forcefully terminate the process
/im = Kill processes based on image name (exe name).
Example screenshot:

Use the following command to get more taskkill parameters:

taskkill /?

You Might Also Like