Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Windows Server 2008 Server Core : Working with General Applications (part 1) - Terminating Tasks with the TaskKill Command

3/28/2011 6:08:22 PM
Most users live for general applications. Word processors, spreadsheets, graphics, productivity enhancers, and other applications all serve the user's needs in some way. Of course, the operating system also runs applications and you'll find more than a few services and other low-level tasks running. In fact, even a well-maintained system will run 25 or more tasks and most run far more. Most users have no idea which applications are running on their systems, but using the utilities in this book, you can discover what those applications are, who's running them, and what the application is supposed to do. The following sections describe three helpful utilities for managing applications on your system.

1. Terminating Tasks with the TaskKill Command

You have a number of ways to kill tasks on a system, but sometimes you have to kill a task by remote control or use the command line to do it. The TaskKill command fulfills both needs. It lets you maintain control over a system, even if you have to use a network connection to do it. This command uses the following syntax:

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

The following list describes each of the command line arguments.


/S
system

Specifies the remote system that you want to check. In most cases, you'll also need to supply the /U and the /P command line switches when using this switch.


/U
[domain\]user

Specifies the username on the remote system. This name may not match the username on the local system. You'll need to supply a domain name when working with a domain controller.


/P
[password]

Specifies the password for the given user. You can provide the command line switch without specifying the password on the command line in cleartext. The system prompts you for the password. Using this feature can help you maintain the security of passwords used on your system.


/FI
Filter

Filters the output information from the utility. The filters can become complex, so read the text that appears after this list for additional information. Table 1 describes the filter criteria.

Table 1. An Overview of TaskKill and TaskList Filters
FilterDescriptionComparison OperatorsValid Values
STATUSUse this filter to locate any applications that are no longer responding so that you can manually end them.eq, neRunning or Not Responding
IMAGENAMEUse this filter to locate a particular application in the list based on its filename.eq, neThe executable filename
PIDUse this filter to locate a particular instance of an application when there's more than one copy of the application running.eq, ne, gt, lt, ge, leProcess Identifier
SESSIONUnless you're using a sharing application such as Terminal Services, this filter is useless because every application running is for the current session.eq, ne, gt, lt, ge, leThe session number
SESSIONNAMEUnless you're using a sharing application such as Terminal Services, this filter is useless because every application running is for the current session.eq, neThe name of the session
CPUTIMEUse this filter to locate applications that have just started or have been running a long time. For example, you might notice a sudden drop in system performance and can use this filter to locate applications that have just started to help determine which application might have caused the performance problem.eq, ne, gt, lt, ge, leThe amount of time that the application has used the CPU in hours, minutes, and seconds since the session has started
MEMUSAGESometimes you have more applications loaded than the system can comfortably support. Use this filter to locate applications that you can end or possible candidates for removal from the system.eq, ne, gt, lt, ge, leThe amount of memory the application uses in kilobytes
USERNAMEUse this filter to separate applications that the user starts from those the system starts.eq, neThe name of the user who started the application
SERVICESUse this filter to locate the application hosting a particular service on the system.eq, neA service name
WINDOWTITLEUse this filter to locate a particular application based on the name it displays to the user.eq, neThe name the application displays to the user on the title bar
MODULESUse this filter to locate applications based on the modules they use. You can use this filter to help locate a variety of problems, including DLL conflicts (when two applications use the same DLL, but they each need a different DLL version).eq, neThe filenames of any modules that an application uses


/PID
processid

Specifies the Process Identifier (PID) of the process that you want to terminate.


/IM
imagename

Specifies the image name (application name) of the process that you want to terminate. You can use wildcard characters to terminate multiple applications.


/F

Forces the process to terminate. Using this option can cause data loss by terminating an application before it has saved any changes the user had made.


/T

Terminates the process and any processes started by the process. The TaskKill command removes all of the processes that the application creates. This is the best option to use for an application that has frozen because there isn't any guarantee the application will clean up after itself.

Other -----------------
- Exchange Server 2010 : IMAP, POP, and Microsoft ActiveSync (part 3) - Autodiscover & ActiveSync
- Exchange Server 2010 : IMAP, POP, and Microsoft ActiveSync (part 2) - Assigning an External Name & Configure POP and IMAP
- Exchange Server 2010 : IMAP, POP, and Microsoft ActiveSync (part 1) - Client Access Server Certificates
- BizTalk 2010 Recipes : Document Mapping - Using the Iteration Functoid
- BizTalk 2010 Recipes : Document Mapping - Using the Looping Functoid
- BizTalk 2010 Recipes : Document Mapping - Using the Value Cross-Reference Functoids
- Windows Server 2008 R2 : Deploying and Using Windows Virtualization - Installing a Guest Operating System Session
- Windows Server 2008 R2 : Becoming Familiar with the Hyper-V Administrative Console
- SharePoint 2010 PerformancePoint Services : Understanding and Working with Scoring (part 2)
- SharePoint 2010 PerformancePoint Services : Understanding and Working with Scoring (part 1) - Changing a Scoring Pattern & Editing Thresholds
 
 
Top 10 video Game
-   Uncharted 4: A Thief's End | E3 2015 Extended Gameplay Trailer
-   V.Next [PC] Kickstarter Trailer
-   Renowned Explorers [PC] Launch Date Trailer
-   The Void (Game Trailer)
-   World of Warships [PC] Open Beta Trailer
-   F1 2015 | Features Trailer
-   Battle Fantasia Revised Edition | Debut Trailer for Steam
-   Victor Vran [PC] Story Trailer
-   Star Wars Battlefront PC Alpha footage
-   Skyforge [PC] Open Beta Gameplay Trailer
-   Armored Warfare [PC] PvE Trailer
-   F1 2015 [PS4/XOne/PC] Features Trailer
-   Act of Aggression [PC] Pre-Order Trailer
-   Sword Coast Legends [PC] Campaign Creation E3 2015 Trailer
-   Sword Coast Legends [PC] Campaign Creation E3 2015 Dungeon Run Trailer
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
Popular keywords
HOW TO Swimlane in Visio Visio sort key Pen and Touch Creating groups in Windows Server Raid in Windows Server Exchange 2010 maintenance Exchange server mail enabled groups Debugging Tools Collaborating
programming4us programming4us
PS4 game trailer XBox One game trailer
WiiU game trailer 3ds game trailer
Trailer game
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer