The process identifier (a.k.a. process ID or PID) is a number used to uniquely identify an active process.
In this short note i will show how to display information about the Windows process (incl. the process name and path to an executable file) by PID from the command-line prompt (CMD) or a Windows PowerShell.
Cool Tip: List processes in Windows from the CMD! Read more →
Get Process Name From PID
Execute the tasklist
command to get the process name from PID:
C:\> tasklist /FI "pid eq <pid>"
– or –
C:\> tasklist /FI "pid eq <pid>" /V /FO List
Option | Description |
---|---|
/FI |
Displays a set of tasks that match a given criteria specified by the filter |
/V |
Displays verbose task information |
/FO |
Specifies the output format |
More information about the process by its PID (including the full path to an executable file) can be retrieved using the wmic
command:
C:\> wmic process where "ProcessID=<pid>" get /format:list
Cool Tip: Kill a hanging process in Windows from the CMD! Read more →