To find all currently running processes on Windows, open Task Manager and go to Processes tab or Details tab (Windows 10). You can check what’s been running on your computer there but won’t be able to print them or save the list in a form you can reference later on. If you ever have a need of printing out a list of running processes on your computer, here are three ways for you. Thanks to Digital Citizen for sharing the idea.
Through Command Prompt
Windows has a built-in command line called tasklist that lists all running processes on a specified computer. You can run the command and redirect the output to a text file. Once you have the file you can either print it or save it for future use.
For example, running the following command saves the list of running processes in a processes.txt file on the desktop.
tasklist > %userprofile%\desktop\processes.txt
Here is what the output looks like:
Furthermore, tasklist has a lot of switches that you can use to make the list a bit nicer. For example, I can run the following command to get the detailed list of running processes that are not services in CSV format.
tasklist /v /fi "sessionname eq console" /fo csv > %userprofile%\desktop\processes.csv
With the output file in CSV format, you can open it in Excel and sort by different columns before you print it out.
To get a list of running processes from a remote computer, use /s switch like this:
tasklist /s computername > %userprofile%\desktop\computername-processes.txt
PowerShell also has a similar cmdlet called Get-Process, or gps. You will need to run the cmdlet and pipe out the result to another cmdlet Out-File to save the output in a text file.
For example, to save the running processes list to a processes.txt file on the desktop, run the following command.
Get-Process | Out-File $env:userprofile\desktop\processes.txt
By default, Get-Process outputs the following details about all running processes.
- 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.
- VM(M): The amount of virtual memory that the process is using, in megabytes. Virtual memory includes storage in the paging files on disk.
- 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.
- ProcessName: The name of the process.
To get the list of running from a remote computer, use -ComputerName parameters.
Get-Process -ComputerName computername | Out-File $env:userprofile\desktop\processes.txt
To directly send the result to a printer, use Out-Printer
Get-Process | Out-Printer
To get a list of specific process, Chrome for example, in a CSV file, use Export-CSV like below.
Through Windows Sysinternals
Sysinternals tool kit also has a command line called pslist that can pull the same information from local and remote computers. Because it runs in Command Prompt window, you can use the same method to save the result in a text file.
For example, the following command saves the list of running processes on my computer in the processes.txt file on my desktop.
pslist > %userprofile%\desktop\processes.txt
The command pslist has a few unique features you may find useful, such as details about thread and memory. If you need the detailed info about how all running processes utilize the memory, running
pslist /m might be more helpful.
It also has a switch called -t that shows the processes in tree mode.
pslist -t > %userprofile%\desktop\processes.txt
To get the list of running processes from a remote computer,
pslist \computername -t > %userprofile%\desktop\processes.txt
Unfortunately, I couldn’t find a way to save pslist’s output in a CSV format so working with the text file in Notepad seems to be the only way.