Tasklist is a command that displays a list of applications
and services with their Process ID (PID) for all tasks running on either a
local or a remote computer.
Syntax
tasklist[.exe] [/s computer]
[/u domain\user [/p password]] [/fo
{TABLE|LIST|CSV}] [/nh] [/fi FilterName
[/fi FilterName2 [ ... ]]] [/m
[ModuleName] | /svc | /v]
Name |
Operators |
Value |
Status |
eq, ne |
RUNNING|NOT RESPONDING |
Imagename |
eq, ne |
Any valid string. |
PID |
eq, ne, gt, lt,
ge, le |
Any valid positive integer. |
Session |
eq, ne, gt, lt,
ge, le |
Any valid session number. |
SessionName |
eq, ne |
Any valid string. |
CPUTime |
eq, ne, gt, lt,
ge, le |
Valid time in the format of hh:mm:ss. The mm
and ss parameters should be between 0 and 59 and hh can be
any valid unsigned numeric value. |
Memusage |
eq, ne, gt, lt,
ge, le |
Any valid integer. |
Username |
eq, ne |
Any valid user name ([Domain\]User). |
Services |
eq, ne |
Any valid string. |
Windowtitle |
eq, ne |
Any valid string. |
Modules |
eq, ne |
Any valid string. |
·
Tasklist is a replacement for
the TList tool.
tasklist /fi "USERNAME ne NT AUTHORITY\SYSTEM" /fi "STATUS eq running"
tasklist /v /fi "STATUS eq running"
tasklist /s srvmain /nh
tasklist /s srvmain /s srvny
tasklist /s srvmain /u maindom\hiropln /p p@ssW23 /nh
Taskkill Ends one or more tasks or processes. Processes can
be killed by process ID or image name.
Syntax
taskkill [/s Computer] [/u Domain\User
[/p Password]]] [/fi FilterName] [/pid ProcessID]|[/im ImageName]
[/f][/t]
Parameters
/s
Computer : Specifies the name or IP
address of a remote computer (do not use backslashes). The default is the local
computer.
/u
Domain \ User : Runs
the command with the account permissions of the user specified by User
or Domain\User. The default is the permissions of the current logged
on user on the computer issuing the command.
/p
Password : Specifies the password of
the user account that is specified in the /u parameter.
/fi FilterName : Specifies
the types of process(es) to include in or exclude from termination. The following
are valid filter names, operators, and values.
Name
|
Operators
|
Value
|
Hostname
|
eq, ne
|
Any valid string.
|
Status
|
eq, ne
|
RUNNING|NOT RESPONDING
|
Imagename
|
eq, ne
|
Any valid string.
|
PID
|
eg, ne, gt, lt, ge, le
|
Any valid positive integer.
|
Session
|
eg, ne, gt, lt, ge, le
|
Any valid session number.
|
CPUTime
|
eq, ne, gt, lt, ge, le
|
Valid time in the format of hh:mm:ss.
The mm and ss parameters should be between 0 and 59 and hh
can be any valid unsigned numeric value.
|
Memusage
|
eg, ne, gt, lt, ge, le
|
Any valid integer.
|
Username
|
eq, ne
|
Any valid user name ([Domain\]User).
|
Services
|
eq, ne
|
Any valid string.
|
Windowtitle
|
eq, ne
|
Any valid string.
|
/pid ProcessID : Specifies
the process ID of the process to be terminated.
/im ImageName : Specifies
the image name of the process to be terminated. Use the wildcard (*) to
specify all image names.
/f
: Specifies that process(es) be forcefully terminated.
This parameter is ignored for remote processes; all remote processes are forcefully
terminated.
/t
: Specifies to terminate all child processes along with
the parent process, commonly known as a tree kill.
/?
: Displays help at the command prompt.