Question

Difficulty: HardMicrosoft Command-Line Tools

A Windows administrator notices that a malfunctioning background service process named `svc_indexer.exe` (PID: 4812) has hung and spawned multiple child processes that are locking system resources. The administrator needs to forcefully terminate both the parent process and all associated child processes in a single command line invocation. Which of the following commands should the administrator run?

  1. taskkill /pid 4812 /t /fAnswer
  2. B
    taskkill /im 4812 /r /a
  3. C
    kill -9 4812
  4. D
    resmon.exe /end process 4812

Answer

The command `taskkill /pid 4812 /t /f` correctly targets the process ID, forcefully kills it, and terminates its child process tree.
The `taskkill` utility allows administrators to terminate running tasks from the Command Prompt. Using `/pid 4812` correctly specifies the numerical Process ID. The `/t` switch specifies tree termination (terminating the process and all child processes started by it), while `/f` specifies forced termination of unresponsive or hung tasks.

Step-by-Step Solution

1
Identify the target process identifier and command objectives.
The target identifier is PID 4812, and the requirement specifies forceful termination of both parent and child processes.
The system prompt dictates targeting by PID rather than image name, requiring tree termination and forced closure.
2
Select the proper Windows command-line utility for process management.
Identify `taskkill` as the correct native Windows command-line tool.
Windows CLI uses `taskkill` for terminating tasks/processes from command prompt.
3
Apply the appropriate command flags for PID target, tree termination, and forced closure.
Combine `/pid 4812` for process ID target, `/t` to include child processes, and `/f` for forced termination.
The `/pid` parameter identifies the numeric ID, `/t` kills the process tree, and `/f` overrides non-responsive process states.

Key Concept

Windows Command-Line Process Termination (Taskkill Switches)
Estimated Time:1m 30s
Rate this question