digital8 Second Lieutenant
Joined: 29 Sep 2005
Posts: 1002
|
Posted: Fri Oct 07, 2005 12:46 pm Post subject: Windows XP Command TASKKILL |
|
|
TASKKILL ends one or more tasks or processes. Processes can be killed by process ID or image name.
Syntax
TASKKILL [/S Computer] [/U Domain\Username] [/P [password]]
{[/FI filtername] [{/PID processid |/IM imagename}]} [/F] [/T]
Description:
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 Computer Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/U domain\username Runs the command with the account permissions of the user specified by UserName or Domain\UserName. The default is the permissions of the current logged on user on the computer issuing the command.
/P password Specifies the password for the given user context. Prompts for input if omitted.
/F Specifies to forcefully terminate process(es).
/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 Terminates the specified process and any child processes which were started by it.
/? Displays this help/usage.
Remarks
The "WindowTitle" and "Status" filters are not supported when a remote system is specified.
The wildcard character (*) is accepted only when specified along with the filters.
Termination for remote processes will always be done forcefully regardless of whether the /f parameter is specified.
Supplying a computer name to the HOSTNAME filter will cause a shutdown and all processes will be stopped.
Use tasklist to determine the Process ID (PID) for the process to be terminated.
Taskkill is a replacement for the Kill tool.
Examples
The following examples show how you can use the taskkill command:
taskkill /pid 1230 /pid 1241 /pid 1253
taskkill /f /fi "USERNAME eq NT AUTHORITY\SYSTEM" /im notepad.exe
taskkill /s srvmain /f /im notepad.exe
taskkill /s srvmain /u maindom\hiropln /p p@ssW23 /fi "IMAGENAME eq note*" /im *
taskkill /s srvmain /u maindom\hiropln /fi "USERNAME ne NT*" /im *
taskkill /pid 2134 /t /fi "username eq administrator"
taskkill /f /fi "PID ge 1000" /im * |
|