Using the TSKILL Command to End Processes

  • Section(s): Miscellaneous
  • Published on Mar 16, 2006.
  • Last Modified on Mar 16, 2006.
  • Last Modified by Chris Sanders.
  • Rated 3.5 out of 5 based on 15 votes.
How to Use the TSKILL Command
The TSKILL command can be executed via the command line to end processes by a particular name or process id. The usage of this command is as follows:

tskill ProcessID | ProcessName [/server:ServerName] [/id:SessionID | /a] [/v]


ProcessID – The ID of the process you wish to terminate.
ProcessName – The name of the process you wish to terminate.
/server:ServerName – Used to specify a remote terminal service to issue the command against.
/id:SessionID – Specifies the session in which the process you want to end resides
/a – Ends all processes by the specified name or ID running in all sessions on a server
/v – Displays information about the actions performed


**NOTE: /server:ServerName must be used in conjunction with /id:SessionID or /a
**NOTE: You can use the “query process” command to find the name and id of a process


This command can come in handy especially when trying to fight a virus or spyware outbreak within your enterprise. By simply including this command in a batch file within a GPO you can effectively terminate the malicious process when a user logs in.

***

Chris Sanders is the network administrator for one of the largest public school systems in the state of Kentucky. Chris's specialties include general network administration, windows server 2003, wireless networking, and security. You can view Chris' personal website at www.chrissanders.org.

About Chris Sanders

Chris Sanders is a network consultant for KeeFORCE, one of the most popular network consulting firms in western Kentucky. Chris is the author of the book Practical Packet Analysis as well as several technical articles. His personal website at www.chrissanders.org contains a great deal of information, articles, and guides related to network administration, network security, packet analysis, and general information technology.

Share this article


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred Data Recovery solution?