Note: You can also use the PowerShell to execute the command. It will work when both – the Command Prompt or PowerShell is run with admin privileges.
Tasklist and Taskkill commands in Windows 10
If you are wondering why to take so much effort, then know that this program was built not for a single computer, but to manage multiple computers. Each of the programs offers the option to connect to remote computers, and even enter the password. The program is for Windows Servers, but it is also available on some Windows consumer versions.
Tasklist
The Tasklist is a utility that lists out the currently running processes either on a local computer or on a remote machine. You can quickly check which processes are running in the background, and then to terminate such processes; we can use the Taskkill command to kill it. Syntax: If you run the command “tasklist /fo table,” it will list down all the programs in a clean format. You can check details such as memory usage to figure out which process is consuming more resources. Find complete details of the syntaxes on Microsoft Docs. Read: How to kill a Process using Command Line?
Taskkill
The name says it all; once you have identified which process you need to kill, you can use Taskkill to remove the program from the list of running processes. Syntax: The simplest way to terminate a program from the command line is to find the PID or Process ID of the program to Taskkill. The PID is listed when you execute the Tasklist to find details of the program usage. Here are some examples: Find complete details of the syntaxes on Microsoft Docs. I hope the post will help you get started with Tasklist and Taskkill.