How To Use The Tasklist And Taskkill Command In Windows (2026)
Tasklist shows every process running on your PC, and taskkill ends the ones you pick.
Together they let you find a stuck program in Command Prompt and close it by name or by process ID.
This guide uses Microsoft’s command references, so every switch and filter below is documented.
Table of Contents
- Tasklist and taskkill quick answers
- What the two commands do
- Open Command Prompt
- List running processes with tasklist
- Change the tasklist output format
- Filter the list with /fi
- Find a frozen program
- End processes with taskkill
- When you need /f and /t
- More examples from Microsoft
- Find which process loads a DLL
- Which command for which job
- Use the commands on another computer
- Wildcard and filter notes
- Official sources
- More Windows guides
Tasklist and taskkill quick answers
| I want to | Type this |
|---|---|
| List every running process | tasklist |
| Show only programs that are not responding | tasklist /fi "STATUS eq NOT RESPONDING" |
| End a process by ID | taskkill /pid 1230 |
| End a process by name, forcefully | taskkill /f /im notepad.exe |
| End a process and its child processes | taskkill /pid 2134 /t |
What the two commands do
Microsoft says tasklist displays a list of currently running processes on the local computer or on a remote computer.
It replaces the older tlist tool.
Taskkill ends one or more tasks or processes, either by process ID (PID) or by image name, and replaces the older kill tool.
Microsoft’s taskkill page points you to tasklist for finding a PID, so the two are meant to be used together.
Open Command Prompt
- Press the Windows key and type cmd.
- Select Command Prompt.
- Type a command and press Enter.
If you need elevated rights, see how to open Terminal as administrator in Windows 11.
List running processes with tasklist
- Type
tasklistand press Enter to see the table of running processes. - Note the image name and the PID of the program you want to close.
- Add
/vfor verbose task information. - Add
/svcto list the services inside each process.
Microsoft notes that using /v and /svc together gives complete verbose output without truncation.
Change the tasklist output format
| Switch | What it does |
|---|---|
/fo table | Table output, which is the default. |
/fo list | List output. |
/fo csv | Comma-separated output. |
/nh | Hides column headers; valid with table or csv. |
/svc | Service information for each process; valid with table format. |
/m <module> | Lists tasks with DLL modules that match the pattern. |
An example from Microsoft combines them: tasklist /v /fi "PID gt 1000" /fo csv.
Filter the list with /fi
The /fi switch limits the output to matching processes.
You can repeat it, and Microsoft’s example shows that multiple filters are combined, so both conditions must match.
| Filter name | Operators | Valid values |
|---|---|---|
| STATUS | eq, ne | RUNNING, NOT RESPONDING or UNKNOWN |
| IMAGENAME | eq, ne | The image name, such as notepad.exe |
| PID | eq, ne, gt, lt, ge, le | A process ID number |
| SESSION | eq, ne, gt, lt, ge, le | A session number |
| CPUTIME | eq, ne, gt, lt, ge, le | HH:MM:SS |
| MEMUSAGE | eq, ne, gt, lt, ge, le | Memory use in KB |
| USERNAME | eq, ne | user or domain\user |
| SERVICES | eq, ne | A service name |
| WINDOWTITLE | eq, ne | A window title |
| MODULES | eq, ne | A DLL name |
Use * as the wildcard, as in tasklist /fi "MODULES eq ntdll*".
Find a frozen program
- Run
tasklist /fi "STATUS eq NOT RESPONDING". - Read the image name and PID in the result.
- Run
taskkill /pid <PID>with that number, ortaskkill /im <name>with the name.
Microsoft notes the STATUS filter does not work against remote systems.
If you prefer a window, there is also how to force stop a program in Windows 11.
End processes with taskkill
| Switch | What it does |
|---|---|
/pid <processID> | Ends the process with that ID. |
/im <imagename> | Ends processes with that image name; * means all image names. |
/f | Forcefully ends the process. |
/t | Ends the process and any child processes it started. |
/fi <filter> | Selects tasks with a filter, using the same names as tasklist. |
You can name several PIDs in one command, as in taskkill /pid 1230 /pid 1241 /pid 1253.
When you need /f and /t
The /f switch is optional, and Microsoft describes it as forcefully ending processes.
Adding /f forcefully ends it, so unsaved work in that program is lost.
Add /t when a program starts helper processes, because it ends the child processes too.
Microsoft’s example taskkill /pid 2134 /t /fi "username eq administrator" ends a PID and its children, but only if the Administrator account started them.
More examples from Microsoft
| Goal | Command |
|---|---|
| End Notepad if the system started it | taskkill /f /fi "USERNAME eq NT AUTHORITY\SYSTEM" /im notepad.exe |
| End every process with a PID of 1000 or higher | taskkill /f /fi "PID ge 1000" /im * |
| List processes with PID above 1000 as CSV | tasklist /v /fi "PID gt 1000" /fo csv |
The second example ends a large number of processes, so do not run it on a PC with unsaved work.
Find which process loads a DLL
The /m switch lists all tasks that have a DLL module matching the pattern you give.
If you leave the module name out, tasklist shows every module loaded by each task.
Microsoft’s example, tasklist /s srvmain /svc /fi "MODULES eq ntdll*", shows service information for processes on a remote computer whose DLL name begins with ntdll.
Which command for which job
| Job | Command to use | Why |
|---|---|---|
| See what is running | tasklist | Lists processes on the local or a remote computer. |
| Find a PID | tasklist /fi “IMAGENAME eq notepad.exe” | Filters the list by image name. |
| Close one program | taskkill /im notepad.exe | Ends processes by image name. |
| Close a program and its helpers | taskkill /pid 2134 /t | The /t switch ends child processes too. |
| Check another PC | tasklist /s srvmain | Uses your current logged-on credentials when /u is not given. |
Microsoft’s remote example for taskkill ends every process on Srvmain whose image name begins with note, using explicit credentials and the filter "IMAGENAME eq note*".
Use the commands on another computer
Both commands accept /s <computer> with a computer name or IP address, without backslashes.
The /u switch runs the command under another account and works only if /s is also given.
Microsoft notes that ending a remote process is always forceful, whether or not you add /f.
Microsoft’s examples put a password on the command line, which is a bad idea on shared or logged systems.
Wildcard and filter notes
Microsoft says the wildcard * is accepted for /im only when a filter is applied.
The WINDOWTITLE and STATUS filters are not supported when you name a remote system.
The taskkill page also mentions a hostname filter that does not appear in its own filter table, so stick to the filters listed in the table above.
Run tasklist again after taskkill to confirm that the process no longer appears in the list.
Check a PID twice before you end it, since closing the wrong process can close something you need.
Official sources
Both commands are documented on Microsoft Learn: tasklist and taskkill.
For a related view of what each program connects to, read how to see active network connections with Netstat.
More Windows guides
- How To Uninstall ESET From Windows Step By Step (2026)
- How To Uninstall Kaspersky Completely From Windows (2026)
- Local Security Authority Protection Is Off In Windows 11 (2026)
- How To Use Ping And Tracert In Windows 11 (2026)
- How To Change UAC Settings In Windows 11 (2026)
- How To Rip A CD To Your PC In Windows 11 (2026)
See all: Windows 11 Guides