... News | Home | Impressum | Contact | Thank you | Listed at | Link to me

HOME  Faq  FAQ - Windows-Command-Prompt   FAQ 09 OF 12

Taskkill with the Cmd.exe, how to use correct and useful with examples!

The taskkill can be used to end one or more processes in any windows OS. With TASKKILL, processes can be killed by the process id or image name.

There are also good programs such as the freeware tool ProcessKO! But why yet another program, if it also goes without.
For this reason, here a couple of useful EXAMPLES for taskkill and tasklist:

1.) ... Find the Procesid via TASKLIST in command prompt!
2.) ... Kill of the Procesid or the program via ProcessID PID!
3.) ... Killing of multiple processes via Proces-ID!
4.) ... Kill programs via the program (exe) name!
5.) ... Creating a desktop shortcut for a fast kill of hanging programs!
6.) ... Command Prompt TASKKIL Help-File.

1.) Find the Procesid via TASKLIST in command prompt!

For this purpose, we use the command Tasklist to find out the corresponding Prozesid (PID).
Here I have me decided for the kill of the CollorConsoe.exe with the PID 1024 (here orange marked).

PS: You can here download the ColorConsole.exe (colored cmd.exe): ... ColorConsole.exe

Image Name                   PID Session Name     Session#    Mem Usage
========================= ====== ================ ======== ============
System Idle Process            0 Console                 0         16 K
System                         4 Console                 0        212 K
smss.exe                     320 Console                 0        400 K
csrss.exe                    380 Console                 0      1,964 K
winlogon.exe                 404 Console                 0     16,768 K
services.exe                 448 Console                 0      3,260 K
lsass.exe                    460 Console                 0      1,576 K
svchost.exe                  612 Console                 0      4,920 K
svchost.exe                  764 Console                 0      4,116 K
svchost.exe                  828 Console                 0     22,280 K
svchost.exe                  920 Console                 0      3,400 K
svchost.exe                 1000 Console                 0      3,876 K
spoolsv.exe                 1112 Console                 0      4,380 K
explorer.exe                1344 Console                 0     18,548 K
vmusrvc.exe                 1440 Console                 0      3,072 K
svchost.exe                 1620 Console                 0      3,292 K
vmsrvc.exe                  1652 Console                 0      2,268 K
vpcmap.exe                  1848 Console                 0      1,044 K
alg.exe                      900 Console                 0      3,440 K
wscntfy.exe                 1268 Console                 0      2,036 K
HelpCtr.exe                 1240 Console                 0      4,336 K
HelpSvc.exe                  504 Console                 0     18,800 K
wpabaln.exe                  996 Console                 0      2,956 K
firefox.exe                 1800 Console                 0      4,144 K
chrome.exe                 1812 Console                 0        592 K
ctfmon.exe                  1684 Console                 0      3,328 K
ColorConsole.exe            1024 Console                 0      3,496 K
cmd.exe                      640 Console                 0      2,524 K
cmd.exe                      580 Console                 0      2,628 K
tasklist.exe                1680 Console                 0      4,416 K
wmiprvse.exe                 532 Console                 0      5,652 K


2.) Kill of the Procesid or the program via ProcessID PID!

After we found the process ID, it is easy to stop (kill) this program.

C:\Windows-7>System32>taskkill /pid 1024

3.) Killing of multiple processes via Proces-ID!

Force quitting several Processen. Here the PID 1812 and PID 1684. (chrome.exe, firefox.exe)

C:\Windows-7>System32>taskkill /pid 1812 /pid 1684

C:\Windows-7>System32>taskkill /pid 1230 /pid 1241 /pid 1253

4.) Kill programs via the program (exe) name!

Info: /F: forces the process to finish. /IM the Image name (program name)

In this case we close all NOTEPAD.EXE instances.

C:\Windows-7>System32>taskkill /IM notepad.exe /F
SUCCESS: The process "notepad.exe" with PID 1580 has been terminated.
SUCCESS: The process "notepad.exe" with PID 732 has been terminated.

5.) Creating a desktop shortcut for a fast kill of hanging programs!

You can create each of the commands as desktop shortcut on the desktop. Idleness is for Internet Explorer, because this still love hangs. It uses the command taskkill / IN the iexplorer.exe / F and simply creates a desktop shortcut.

By right clicking on the free space on the windows desktop, then click on the "New", "shortcut" in the desktop context menu, type only the command taskkill /IM iexplore.exe /F and "Kill IE" via desktop shortcut.

taskkill /IM iexplorer.exe /F

6.) Command Prompt TASKKIL Help-File.

C:\Documents and Settings\Administrator\Desktop>taskkill /?

TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/F] [/T]

This command line tool can be used to end one or more processes.
Processes can be killed by the process id or image name.

Parameter List:
/S    system           Specifies the remote system to connect to.

/U    [domain\]user    Specifies the user context under which
             the command should execute.

/P    [password]       Specifies the password for the given
             user context. Prompts for input if omitted.

/F                     Specifies to forcefully terminate

/FI   filter           Displays a set of tasks that match a
             given criteria specified by the filter.

/PID  process id       Specifies the PID of the process that
             has to be terminated.

/IM   image name       Specifies the image name of the process
             that has to be terminated. Wildcard '*'
             can be used to specify all image names.

/T                     Tree kill: terminates the specified process
             and any child processes which were started by it.

/?                     Displays this help/usage.

Filter Name   Valid Operators           Valid Value(s)
-----------   ---------------           --------------
STATUS        eq, ne                    RUNNING | NOT RESPONDING
IMAGENAME     eq, ne                    Image name
PID           eq, ne, gt, lt, ge, le    PID value
SESSION       eq, ne, gt, lt, ge, le    Session number.
CPUTIME       eq, ne, gt, lt, ge, le    CPU time in the format
                              of hh:mm:ss.
                              hh - hours,
                              mm - minutes, ss - seconds
MEMUSAGE      eq, ne, gt, lt, ge, le    Memory usage in KB
USERNAME      eq, ne                    User name in [domain\]user
MODULES       eq, ne                    DLL name
SERVICES      eq, ne                    Service name
WINDOWTITLE   eq, ne                    Window title

NOTE: Wildcard '*' for the /IM switch is accepted only with filters.

NOTE: Termination of remote processes will always be done forcefully
irrespective of whether /F option is specified or not.

TASKKILL /S system /F /IM notepad.exe /T
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
TASKKILL /F /IM notepad.exe /IM mspaint.exe
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"

C:\Documents and Settings\Administrator\Desktop>

FAQ 9: Updated on: April 1th 2014 12:19
FAQ: Windows-Command-Prompt
4. How to scans all protected system files?
5. How to displays all network connections and listening ports?
6. How to create at once, several subfolders levels?
7. Close correctly, the command prompt e.g. cmd.exe!
8. How to remove read-only or hidden file attribute vial cmd?
9. Taskkill with the Cmd.exe, how to use correct and useful with examples! ***
10. Make Windows command prompt wider, how to?
11. Long file and folder paths in the CMD prompt (insert,paste)!
12. Start programs with different priority classes, how to?

  Windows-Command-Prompt FAQ-INDEX

  My question is not there in the FAQ
Direct to FAQ:
# Q-DIR # WinScan2PDF # DontSleep # DesktopOK # Windows-10 # Windows-8 # Windows-7 # SoftwareOK # NewFileTime # ExperienceIndexOK # Run-Command # NonCompressibleFiles # BlankAndSecure # OnlyStopWatch # MultiClipBoardSlots # PointerStick # Extern-Downloads # DesktopSnowOK # System-General # Microsoft-Office # FileSystem # GetWindowText # TheAeroClock # ThisIsMyFile # AlwaysMouseWheel # Beginners # OneLoupe # Windows-Command-Prompt # ProcessKO # This-and-That-or-Other # IsMyHdOK # QuickTextPaste # MeinPlatz # Internet-WWW # FontViewOK # TraceRouteOK # Android # StressMyPC # Samsung-Galaxy # Glossar # WinBin2Iso
Asked questions on this answer:
  1. Kill internet explorer with taskkill?
  2. Taskkill pid force?
  3. Taskkill /im notepad?
  4. Process id 1684?
  5. How to kill idle tasks in cmd.exe?
  6. Taskkill svchost.exe?
  7. How to taskkill windows 7 on cmd?
  8. Taskkill kill cmd.exe?
  9. How to use taskkill command with example?
  10. Kill csrss.exe in cmd?
  11. How to taskkill a program using cmd?
Keywords: windows, command, prompt, taskkill, with, correct, useful, examples, Questions, Answers, Software


Quick-Link's : Ready for eBay lost disk space quadruple tree terminating goes faster;)
Home | Thanks | Contact | Link me | FAQ | English-AV | Impressum | Translate | PayPal | PAD-s
 © 2017 by Nenad Hrg softwareok.desoftwareok.comsoftwareok.eu
Take OneLuope and stretch the screen. // The PC is slow! Is it the CPU? // Default bold font // Folder size // Quickly kill ;) // You manage the files and folders with Q-Dir? Why not? // Fonts quick overview //