Save all Windows processes to a text file

Martin Brinkmann
Jul 6, 2018
Updated • Jul 6, 2018
Windows
|
9

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.

The Tasklist tool

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:

  • tasklist /fi "USERNAME eq Martin" -- returns the list of processes run under the user Martin.
  • tasklist /fi "USERNAME ne NT AUTHORITY\SYSTEM" /fi "STATUS eq running" -- returns all processes that are running under system processes.
  • tasklist /fi "MODULES eq nt*" -- Lists all processes that have a DLL that begins with nt.
  • tasklist /fi "PID gt 2000" -- displays all processes with an ID greater than 2000.
  • tasklist /fi "MEMUSAGE gt 4096" -- lists all processes whose memory usage is greater than 4096 Kilobytes.

You can combine filters with other parameters:

  • tasklist /s BasementComp /svc /fi "MEMUSAGE gt 4096" -- Lists processes on the remote computer BasementComp that use more than 4 Megabytes of RAM.
  • tasklist /s BasementComp /u maindom\joe /p password -- to list processes on the remote computer BasementComp using the user joe and joe's password.

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?

Summary
Save all Windows processes to a text file
Article Name
Save all Windows processes to a text file
Description
The guide provides you with information about the Windows command line tool tasklist and explains how to use it to save all processes to a text file.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. NasirM12 said on August 17, 2022 at 9:00 pm
    Reply

    I am getting different results from Win10 Task Manager and below Tasklist command.

    tasklist /v /FO csv > “C:\Users\\Documents\tasks.csv”

    Many Processes are not listed in the CSV file produced by the Tasklist command. One example is ’64-bit Synaptics Pointing Enhance Service’ is displayed in Task Manager window but not in the Tasklist CSV file. I am going to try Process Explorer.

    NOTE: Microsoft Win10 Updates of Aug 8, 2022 has messed my Win10. Google Chrome keeps crashing in User Account but not in the Admin Account of my personal laptop. Trying to list and compare all processes from both accounts.

    Lesson Learned: Can’t trust MS even after 37 years, should have performed full backup before updating.
    I started using Microsoft Windows since 1986; its problems are Deja Vu.

  2. Drew said on December 21, 2020 at 6:16 pm
    Reply

    how see only “Applications tab” matrixial information?

  3. Elias Fotinis said on July 6, 2018 at 11:40 pm
    Reply

    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. :)

  4. Matt said on July 6, 2018 at 8:36 pm
    Reply

    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.

  5. Niko, Poland said on July 6, 2018 at 7:46 pm
    Reply

    Hello. You can overwrite the file.

    tasklist >> d:\processes.txt

  6. John Fenderson said on July 6, 2018 at 6:32 pm
    Reply

    This is incredibly useful. I wish I had known how to do this years ago!

  7. Franck said on July 6, 2018 at 1:15 pm
    Reply

    Very useful, thank you !

  8. Paul(us) said on July 6, 2018 at 12:44 pm
    Reply

    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.

    1. Shiva said on July 7, 2018 at 11:22 am
      Reply

      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.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.