If you want to view a list of processes running on your computer and you are either unable to open Task Manager or you want to be able to print the list, we have a simple procedure that allows you to generate a list of running processes and write it to a text file. The list contains the PID (process ID) and memory usage for each process.
This procedure below works in all versions of Windows from XP to Windows 10. Generate List of Processes
To generate a list of running processes, open the Command Prompt as Administrator. To do this, click on Start, type in cmd and then right-click on Command Prompt and choose Run as Administrator.
To see the list of running processes directly in the Command Prompt window, enter the following line at the prompt and press Enter. tasklist
A nice table with headings displays all the running processes.
To write the table of running processes to a text file, enter the following line at the prompt and press Enter. tasklist > c:\processes_list.txt
NOTE: The above command saves a file called processes_list.txt to C:. If you want to save the file with a different name to a different location, enter the full path of the desired location and enter a different file name.
In our example, the processes_list.txt file is written to the root of the C: drive.
The table of running processes is available in text file format, allowing you to print the information from a text editor, such as Notepad.
You can also generate a list of running services in the same manner. To do this, enter the following line at the prompt and press Enter. tasklist/svc > c:\services_list.txt
NOTE: Again, you can change the path and filename as desired.
A table displays the list of services with their associated PIDs.
NOTE: This is a good way to find out what services are being hosted by the various instances of the svchost.exe file. Svchost.exe is a process that hosts other services to perform various functions and there can be multiple instances of svchost.exe running at one time. See our post, Svchost.exe explained and demystified, for more information about svchost.exe.
This procedure can come in handy if you need to kill a process and a virus is preventing Task Manager from opening. You can generate the list of running processes in the command prompt, get the PID for the process you want to kill, and then use the taskkill command to kill the process. Enter the following line on the command prompt for more information on how to use the taskkill command. taskkill /?
Also, see our post on using the command line to kill a process for an easy way to kill non-responsive processes. Enjoy!