It can sometimes be useful to dump the list of all running processes on a Windows machine. While you can use the Task Manager or third-party applications like Process Explorer or TaskSchedulerView to list all running tasks and manage them directly from within the interface.
Third-party apps like Process Explorer support the exporting of all processes to text files on the system but the standard Task Manager of the Windows operating system does not.
Windows includes the command line tool tasklist that is designed to display the list of tasks and filter the listing. While it does not support built-in export options, it does support the option to direct command line output elsewhere.
Tasklist, just like taskkill which we published a guide about earlier, is a handy command line tool that all supported versions of Windows support.
You can run tasklist from the command line and don't need elevated rights for that. Just tap on Start, type cmd.exe and open the Command Prompt from the results to get started.
Simply typing tasklist and hitting the Enter-key displays a list of all running processes on the system. Each process is listed with its name, process ID, session name and number, and memory usage.
You can save the process listing right away by running the command tasklist > output directory and file name, e.g. tasklist > d:\processes.txt.
The utility supports three different display formats. Table is used by default but you may use the command /fo to switch to list or csv view instead. Just use tasklist /fo csv to display the list of processes in a comma separated format instead.
Tasklist shines when it comes to supported filters. You can use filters to display information that you need from information that you don't need. Filters exist to display processes by memory usage, CPU time, process ID, window title, or username among others.
Filters support operators such as eq=equal, ne=not equal, or gt=greater. Note that the filters WINDOWTITLE and STATUS are not supported when you run tasklist on a remote system.
Here is a list of examples that demonstrate filter usage:
You can combine filters with other parameters:
You can save all outputs to a text file using the > destination command.
Additional information is provided when you run tasklist /? and on Microsoft's Docs website.
Now You: Which command line tools do you use?
Please click on the following link to open the newsletter signup page: Ghacks Newsletter Sign up
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.
The free, awards winning software for exploration & management of System Internals system explorer version 7.1.05359, which is still working like a charm in the latest Windows 10 version 1803 17134.137, has an included future that there is the possibility to make also all kind of running programs lists.
By the way hopefully, the developer will pick up (2016-04-30) this really great program.
p.s. I know about the Mark Russinovich program Process Explorer but personly I prefer System explorer.
I use it too (portable 7.0.05356 on win 7) and I corfirm that is a very useful software. You can export as .txt or .cvs all the column you choose in process window. But you can export as well modules, drivers, services and other informations.
Very useful, thank you !
This is incredibly useful. I wish I had known how to do this years ago!
Hello. You can overwrite the file.
tasklist >> d:\processes.txt
If you prefer, you can open the task list in Notepad instead:
tasklist /fo table | clip && notepad
-Press Ctrl+V, then choose to save or not…
Or, manipulate the data in Excel instead: (using Excel 2007 right now)
tasklist /fo table | clip && start excel
-When it opens, click “Paste” or Ctrl+V
-Move to “Data” tab, then click “Text-To_Columns”
-Highlight table heading, then click “Filter”
-Sort or manipulate the table further as you like
I like to also…
-Delete row “3” and column “F”
-Select columns “A” through “E”, then add “Conditional Formatting”-“Data Bars” from the “Home” tab.
-Sort by Mem Usage, etc.
You can do the same and much more with PowerShell. Its commands (or “cmdlets”) return actual objects instead of text, so filtering, sorting, formatting, etc. are way easier. For example, this command pipeline:
ps firefox | where WorkingSet -ge 200mb | select id,handles | ConvertTo-Csv > myfile.csv
will first generate info of all Firefox processes, then keep only those with a working memory set of 200MB or greater, then select the process ID and number of open handles of each process (among some 80 available properties), then format the result as CSV and finally write the output to a file!
The PowerShell console also supports Tab autocompletion of paths, commands, switches and even option values, so typing even long commands can be lightning fast. Combine that with extensive help and high discoverability and you’ll see why I haven’t opened a CMD prompt in years. :)
how see only “Applications tab” matrixial information?