How to See a Process's Command Line in Task Manager (and CMD)

You can see the command line of running processes in Task Manager, PowerShell or Command Prompt.

Method 1: Task Manager

  1. Open the Task Manager.
  2. Select the Details tab.
  3. Right-click the column header and select Select columns.

  4. Select columns option in Task Manager Details tab

  5. Enable the Command line item.

  6. Enabling the Command line column

  7. Now the Task Manager displays the command line of running processes.

  8. Task Manager showing the command line of each process

Method 2: PowerShell

  1. Press the Windows key, type "PowerShell", and click Windows PowerShell.
  2. Copy and paste the following line, then press Enter:
Get-CimInstance Win32_Process | Select-Object ProcessId, Name, CommandLine

This lists every running process with its command line.

Method 3: Command Prompt (CMD)

  1. Press the Windows key, type "cmd", and click Command Prompt.
  2. Type the following and press Enter:
wmic process get ProcessId,Name,CommandLine

Note: wmic is deprecated and may be missing on newer Windows 11 versions. If you get an error, use PowerShell (Method 2).

Open Task Manager from CMD

To open Task Manager from Command Prompt or the Run window (Windows key + R), type:

taskmgr

Related guides