Tasklist
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
Displays a list of currently running processes on either a local or remote machine.
tasklist [/s Computer [/u Domain**\User [/p** Password]]] [{/m Module | /svc | /v}] [/fo {TABLE | LIST | CSV}] [/nh] [/fi Filter [/fi Filter [ ... ]]]
- /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.
- /m Module
Lists all tasks that have DLL modules loaded in them matching the given pattern name. If the module name is not specified, this option displays all modules loaded by each task.
- /svc
Lists all the service information for each process without truncation. Valid when the /fo parameter is set to TABLE.
- /v
Specifies that verbose task information be displayed in the output. To see complete verbose output without truncation, use in conjunction with the /svc parameter.
- /fo{ TABLE| LIST| CSV}
Specifies the format to use for the output. Valid values are TABLE, LIST, and CSV. The default format for output is TABLE.
- /nh
Suppresses column headers in the output. Valid when the /fo parameter is set to TABLE or CSV.
- /fi Filter
Specifies the types of process(es) to include in or exclude from the query. The following table lists valid filter names, operators, and values.
<table>
<colgroup>
<col style="width: 33%" />
<col style="width: 33%" />
<col style="width: 33%" />
</colgroup>
<thead>
<tr class="header">
<th>Name</th>
<th>Operators</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>Status</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong></p></td>
<td><p><strong>RUNNING</strong> | <strong>NOT RESPONDING</strong> | <strong>UNKNOWN</strong></p></td>
</tr>
<tr class="even">
<td><p><strong>Imagename</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong></p></td>
<td><p>Any valid string.</p></td>
</tr>
<tr class="odd">
<td><p><strong>PID</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong>, <strong>gt</strong>, <strong>lt</strong>, <strong>ge</strong>, <strong>le</strong></p></td>
<td><p>Any valid positive integer.</p></td>
</tr>
<tr class="even">
<td><p><strong>Session</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong>, <strong>gt</strong>, <strong>lt</strong>, <strong>ge</strong>, <strong>le</strong></p></td>
<td><p>Any valid session number.</p></td>
</tr>
<tr class="odd">
<td><p><strong>SessionName</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong></p></td>
<td><p>Any valid string.</p></td>
</tr>
<tr class="even">
<td><p><strong>CPUTime</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong>, <strong>gt</strong>, <strong>lt</strong>, <strong>ge</strong>, <strong>le</strong></p></td>
<td><p>Valid time in the format of <em>hh</em>:<em>mm</em>:<em>ss</em>. The <em>mm</em> and <em>ss</em> parameters should be between 0 and 59 and <em>hh</em> can be any valid unsigned numeric value.</p></td>
</tr>
<tr class="odd">
<td><p><strong>Memusage</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong>, <strong>gt</strong>, <strong>lt</strong>, <strong>ge</strong>, <strong>le</strong></p></td>
<td><p>Any valid integer.</p></td>
</tr>
<tr class="even">
<td><p><strong>Username</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong></p></td>
<td><p>Any valid user name ([<em>Domain</em>\]<em>User</em>).</p></td>
</tr>
<tr class="odd">
<td><p><strong>Services</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong></p></td>
<td><p>Any valid string.</p></td>
</tr>
<tr class="even">
<td><p><strong>Windowtitle</strong></p></td>
<td><p><strong>eq</strong>, <strong>ne</strong></p></td>
<td><p>Any valid string.</p></td>
</tr>
</tbody>
</table>
- /?
Displays help at the command prompt.
The "WindowTitle" and "Status" filters are not supported when querying on a remote system.
Tasklist is a replacement for the tlist tool.
The following examples show how you can use the tasklist command:
tasklist /v /fi "PID gt 1000" /fo csv
tasklist /fi "USERNAME ne NT AUTHORITY\SYSTEM" /fi "STATUS eq running"
tasklist /v /fi "STATUS eq running"
tasklist /s srvmain /nh tasklist /s srvmain /svc /fi "Modules eq ntdll*"
tasklist /s srvmain /u maindom\hiropln /p p@ssW23 /nh
Format | Meaning |
---|---|
Italic |
Information that the user must supply |
Bold |
Elements that the user must type exactly as shown |
Ellipsis (...) |
Parameter that can be repeated several times in a command line |
Between brackets ([]) |
Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} |
Set of choices from which the user must choose only one |
|
Code or program output |