How to show full command line of all processes in Windows

In cmd, run the following:

wmic process get processid,commandline

To filter for a particular program:

wmic process where "name like '%chrome%'" get processid,commandline

The other properties that you can query for processes are:

  • Caption
  • CommandLine
  • CreationClassName
  • CreationDate
  • CSCreationClassName
  • CSName
  • Description
  • ExecutablePath
  • ExecutionState
  • Handle
  • HandleCount
  • InstallDate
  • KernelModeTime
  • MaximumWorkingSetSize
  • MinimumWorkingSetSize
  • Name
  • OSCreationClassName
  • OSName
  • OtherOperationCount
  • OtherTransferCount
  • PageFaults
  • PageFileUsage
  • ParentProcessId
  • PeakPageFileUsage
  • PeakVirtualSize
  • PeakWorkingSetSize
  • Priority
  • PrivatePageCount
  • ProcessId
  • QuotaNonPagedPoolUsage
  • QuotaPagedPoolUsage
  • QuotaPeakNonPagedPoolUsage
  • QuotaPeakPagedPoolUsage
  • ReadOperationCount
  • ReadTransferCount
  • SessionId
  • Status
  • TerminationDate
  • ThreadCount
  • UserModeTime
  • VirtualSize
  • WindowsVersion
  • WorkingSetSize
  • WriteOperationCount
  • WriteTransferCount

The WMIC tool is deprecated in Windows 10, version 21H1 and the 21H1 semi-annual channel release of Windows Server. This tool is superseded by Windows PowerShell for WMI.

Now we can use PowerShell command to achieve this:

Get-CimInstance Win32_Process -Filter "name LIKE '%OmniSharp.exe%'" | Select ProcessId, CommandLine | format-list

or

Get-CimInstance -Query "SELECT * FROM Win32_Process WHERE name LIKE '%OmniSharp.exe%'" | Select ProcessId, CommandLine | format-table -wrap