TSKILL

End a process running in a session on a Remote Desktop Session Host (RD Session Host) server..

Tskill can be used to end any process that belongs to you, unless you are an administrator. Administrators have full access to all tskill functions and can end processes that are running in other user sessions.

Syntax
      TSKILL processid | processname [ /SERVER:servername] [ /ID:sessionid | /A] [ /V]

Key
   processid           Process ID for the process to be terminated.

   processname         Process name to be terminated
                       (Usually the name of the executable with trimmed ".exe" suffix).

   /SERVER:servername  Server containing processID (default is current).
                          /ID or /A must be specified when using processname
                          and /SERVER

   /ID:sessionid       End process running under the specified session (default is current).
   /A                  End process running under ALL sessions.

   /V                  Display information about actions being performed.

processname is limited to 18 characters.

When all processes that are running in a session end, the session also ends.

If you use the ProcessName and the /server:ServerName parameters, you must also specify either the /id:SessionID or the /a parameter. This is because potentially multiple users could be running the same program.

Examples:

Terminate a running instance of notepad.

tskill notepad

Terminate the running process #6464.

tskill 6464

"Managers tend to treat organizations as if they are infinitely plastic. They hire and fire, merge, downsize, terminate programs, add capacities. But there are limits to the shifts that organizations can absorb" ~ Kevin Kelly

Related:

TASKKILL - End a running process
PsKill - Kill processes by name or process ID
WMIC PROCESS where name='evil.exe' delete / WMIC PROCESS where processid='6464' delete
Powershell: Stop-Process - Kill a process
Equivalent bash command (Linux): kill - Kill a process


© Copyright SS64.com 1999-2014
Some rights reserved