The command prompt, and resurgence of a glorious past, devoid of computer graphics interface, has dozens of orders, some of which have no equivalent Windows. This is particularly true of Taskkill, a very handy command to kill some more instances of the same program.
Taskkill is one of the commands that the system particularly so terribly misunderstood and practice daily.
Taskkill allows the command to kill all tasks meet the criterion of selection. Since it is not uncommon to find half planted with several instances of one application in memory (typically explorer.exe, iexplore.exe, svchosts.com, outlook.exe, etc..), This command allows give a quick clean up the process started without having to kill them one by one, through the Windows Task Manager.
The command Taskkill works with the TaskList which takes roughly the same parameters. TaskList list active processes in memory. It is therefore advisable to test first on TaskList the selection parameters that you intend to use on Taskkill.
The commands have the following form:
Code:
TaskList / FI "filter"
Code:
TASKKILL / FI "filter" / IM name / T / F
In these commands "filter" is expressed as:
COMMAND Operator Values
STATUS eq, ne RUNNING / NOT RESPONDING / UNKNOWN
ImageName eq, ne name of the process
PID eq, ne, gt, lt, ge, Value of the PID of process
SESSION eq, ne, gt, lt, ge, le Session number
SESSIONNAME eq, ne Session name
CPUTIME eq, ne, gt, lt, ge, le CPU time (hh: mm: ss)
MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB
SERVICES eq, ne Service name
WINDOWTITLE eq, ne Window title
MODULES eq, ne DLL name
The meaning of the operators is as follows:
eq = Equal to
ne = Not equal to
gt = Greater than
ge = Greater than or Equal to
lt = Less than
le = Less than or Equal to
Thus:
Code:
TaskList / FI "STATUS eq NOT RESPONDING"
list all processes that seem planted.
Code:
TASKKILL / FI "STATUS eq NOT RESPONDING" / F / T
kills all processes that seem planted.
Also:
Code:
TaskList / FI "MEMUSAGE gt 300000"
list all processes which exceeds the memory greater than 300 MB
Code:
TASKKILL / FI "MEMUSAGE gt 300000" / F / T
kill all processes which exceeds the memory greater than 300 MB
Or:
Code:
TaskList / FI "CPUTIME gt 00:10:00"
list all processes whose CPU occupancy exceeds 10 minutes
Code:
TASKKILL / FI "CPUTIME gt 00:10:00"
kill all processes whose CPU occupancy exceeds 10 minutes
Bookmarks