taskkill

Terminates Processes

Terminates Processes


taskkill

  • C:\Windows\system32\taskkill.exe /?

Output:


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

Description:
    This tool is used to terminate tasks by process id (PID) 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.

    /FI   filter           Applies a filter to select a set of tasks.
                           Allows "*" to be used. ex. imagename eq acme*

    /PID  processid        Specifies the PID of the process to be terminated.
                           Use TaskList to get the PID.

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

    /T                     Terminates the specified process and any
                           child processes which were started by it.

    /F                     Specifies to forcefully terminate the process(es).

    /?                     Displays this help message.

Filters:
    Filter Name   Valid Operators           Valid Value(s)
    -----------   ---------------           -------------------------
    STATUS        eq, ne                    RUNNING |
                                            NOT RESPONDING | UNKNOWN
    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
                                            format
    MODULES       eq, ne                    DLL name
    SERVICES      eq, ne                    Service name
    WINDOWTITLE   eq, ne                    Window title

    NOTE
    ----
    1) Wildcard '*' for /IM switch is accepted only when a filter is applied.
    2) Termination of remote processes will always be done forcefully (/F).
    3) "WINDOWTITLE" and "STATUS" filters are not considered when a remote
       machine is specified.

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

Return Code: 0


C:\Windows\system32\taskkill.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
FileInfo
File Size101376bytes
Creation Time2019/12/07 18:09:30
LastWrite Time2019/12/07 18:09:30
ProductVersion10.0.19041.1
FileVersion10.0.19041.1 (WinBuild.160101.0800)
HashValue
MD5a599d3b2fafbde4c1a6d7d0f839451c7
SHA10225bbec16cb7b23b189f811065767180eda9801
SHA224ecc52331f7f24a6d3c83592c84285c6cab31bf4c12a09ce1f0c48cef
SHA25656f8cc2c1790c389394733b84c3fb55e10977e9f0fe0c08110ac11f0fe47f05e
SHA38494a9cbc5732353b92378fd8bce2941aea223991653bfd2fe330fe40c79afe239e8cea5fcc16439c82d8320e4094ffd83
SHA512acfd16b245a667c3766d36ea753aa7002a03c206b7c3117ccac92315401b536f56ceff606d8112178dd8916a20378ab91818e0e65e6ccfd5d75955f511d6fbfb
Built with Hugo
Theme Stack designed by Jimmy