How do you list and stop processes from Windows command line?
Answer
In Command Prompt, `tasklist` lists processes and `taskkill` can terminate them by PID or image name. In PowerShell, `Get-Process` returns process objects and `Stop-Process` terminates selected processes. Prefer identifying the exact PID and verifying the process before using force, especially on shared test machines.
Strong answer includes
- tasklist and taskkill are CMD-native tools
- Get-Process and Stop-Process are PowerShell cmdlets
- verifies PID or process identity before termination
Practical example
Use `tasklist /fi "IMAGENAME eq java.exe"` to narrow candidates, then `taskkill /PID 4321` for the confirmed process. In PowerShell, `Get-Process java` provides object properties before `Stop-Process -Id 4321`.