One of our readers asked us: “How do you print the list of running processes from the Task Manager?”. The answer is... you can’t do this from the Task Manager , not even in Windows 10. In order to print such a list, you need to use the Command Prompt or PowerShell and run some commands to generate the list of running process and then you can print it just like you would print a document. Let's see how it all works:
NOTE: This guide works in Windows 10, Windows 8.1 and Windows 7.
How to print the list of running processes from the Command Prompt
Start the Command Prompt and use the following command: tasklist > “path to file”. The tasklist command displays a list of applications and services for all tasks running on your Windows computer. The parameter used specifies the text file where this list is saved. I wanted to save the list in a file named processes.txt , on my D drive, so I typed: tasklist > “D:\processes.txt”. When choosing the path where you want to save the file, make sure it is a place where your user account has access.
If you need some help with opening the Command Prompt , read this guide: 7 Ways To Launch The Command Prompt In Windows.
When you open the output file in Notepad , you see it formatted as shown in the screenshot below. The data is placed in a table with the following columns: Image Name , PID (Process ID), Session Name , Session# (# stands for Number) and Mem Usage (Memory Usage).
Obviously, this command has parameters you can use to format its output. Complete documentation can be found on Microsoft’s TechNet website here: Tasklist. Don’t hesitate to read it and experiment on your own.
How to print the list of running processes from PowerShell
PowerShell is a more complex command-line tool that allows for more customization of its output. The basic command to use is: get-process or gps (its short version).
To send its output to a text file, you need to write get-process | out-file “path to file” or gps | out-file “path to file”. I wanted to save the list in a file named process.txt , on my D drive, so I typed: get-process | out-file “D:\process.txt”. You can see this command as well as its short-version alternative, type in the PowerShell window below. When choosing the path to where you want to save the file, make sure that it is a place where your user account has access.
If you need help starting PowerShell , don’t hesitate to read this article: What is PowerShell & What can you do with it?.
The output text file is formatted as shown below and it includes the following columns:
- Handles - The number of handles that the process has opened.
- NPM(K) - The amount of non-paged memory that the process is using, in kilobytes.
- PM(K) - The amount of pageable memory that the process is using, in kilobytes.
- WS(K) - The size of the working set of the process, in kilobytes. The working set consists of the pages of memory that were recently referenced by the process.
- CPU(s) - The amount of processor time that the process has used on all processors, in seconds.
- Id - The process ID (PID) of the process that is running.
- SI - unfortunately we couldn’t find any documentation for this column and the data it shares.
- ProcessName - The name of the process that is running.
As you can see, the output is more complex than when using the Command Prompt. Also, there are plenty more options to customize the output. I recommend that you read the following documentation: Get-Process (Get a list of processes running on a machine), Out-File (Send output to a file) and Out-Printer (Send output to a printer).
We hope that you found this tutorial useful. If you know other methods for printing a list of the processes that are running in Windows, don't hesitate to share them using the comments form below.