Resources » Tools and Utilities

How to kill a process from command line in Windows 7


Posted Date: 29-Jun-2010  Last Updated:   Category: Tools and Utilities    
Author: Member Level: Gold    Points: 12


This article explains How to kill a process in Windows 7 from the command line which is easier to kill a process rather than using task manager



To kill a process in Windows 7 using Command prompt


Every one knows to kill a process in Windows using Task Manager Wizard.

Normally we are making use of ctrl+alt+del keys to show up the task manager wizard to kill the memory eating processor or "Not responding" process. Alternatively we can also make use of Windows command prompt to kill the process.

There are some more commands available like tasklist, tskill and taskkill and it can be used in command prompt.

TaskList


"Tasklist" utility displays a list of programs/processes which are running in a local or remote machine with information like how much memory and CPU time is used by a process. It will also shows the session name and Process ID (PID) of each process. Each process is assigned with an unique number.

By default tasklist will show the Image Name, PID, Session Name, Session, Mem Usage (Kilo Bytes).

Using tasklist you can connect to a remote system to check for the running process and to kill the remote machine process.

tasklist /S remotesystemname will show the list of process running in the remote machine.

tasklist /V will show additional details like Status, CPU Time, and Window Title.

tasklist –FI "STATUS eq unknown" will show all the process with unknown as status.

tasklist /svc will list the service hosted in each process.

For more options on tasklist command check the help using tasklist /?

Tskill


"Tskill" to kill the process based on the process name or processid which is running in a local machine or in a remote machine.

tskill notepad will kill all notepad opened in the system.

tskill 1783 will terminate the application which is running with process id 1783

tskill /SERVER:mytestserver notepad /A will terminate the notepad which is running on the server which is running in ALL sessions.

For more advanced options on tskill command check the help using tskill /?


Taskkill


"Taskkill" will terminate a process similar like tskill, but we can use Image Name or PID with filter option in a local machine or in a remote machine.

taskkill /IM notepad.exe will terminate the notepad.exe

taskkill /PID 2324 /PID 23444 /PID 3444 /T will terminate multiple PID and also its child processes which were started by the parent process.

taskkill /PID 2344 /F will forcefully terminate the process with process id 2344.

For more options on taskkill command check the help using taskkill /?



Did you like this resource? Share it with your friends and show your love!




Responses to "How to kill a process from command line in Windows 7"
Guest Author: detroy     03 Dec 2013
C:\Windows\system32>taskkill /IM K7AVScan.exe /f
ERROR: The process "K7AVScan.exe" with PID 6528 could not be terminated.
Reason: Access is denied.

What is the solution?



Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Submit Article     Return to Article Index

    Active Members
    TodayLast 7 Daysmore...