Get List of Running Processes in PowerShell
This article introduces the
Get-Process cmdlet to list running processes in PowerShell.
Get-Process Cmdlet to Show List of Running Processes in PowerShell
There are more than 200 cmdlets available in the PowerShell environment. Each cmdlet is responsible for performing a specific function.
Get-Process is one of the frequently used cmdlets that help retrieve the list of running processes on the Windows machine.
This cmdlet gives useful information related to each process, such as process ID, name, memory usage, etc. Also, it shows a snapshot of the system’s running processes.
Get-Process [[-ProcessName] string] [-NameOfTheComputer string] [-FileVersionInfo] [-Module] [CommonParameters] Get-Process -processID Int32 [-ComputerName string] [-FileVersionInfo] [-Module] [CommonParameters] Get-Process -ProcessInputObject Process [-ComputerName string] [-FileVersionInfo] [-Module] [CommonParameters]
The parameters are optional to the
Get-Process cmdlet, and you can use those parameters based on your requirement.
Display All the Running Processes
We can directly use the
Get-Process command without any parameters. It should display all the running processes at that time.
gps alias can be used instead of the
There is several useful information available in the output table.
Id- The unique identifier for a given process.
ProcessName- The name of the process.
CPU(s)- This is the processor time that the process has used (given in seconds).
PM(K)- The size of the pageable memory (given in Kilo-bytes).
Retrieve the Information for a Single Process
Get-Process -Name typora
The above two commands will filter the list of processes by the given process name and display the running processes for that particular process name.
Retrieve the Information for Multiple Processes
You can specify more than one process by its name as the name parameter. It will list down all the processes with the relevant information.
Get-Process NotePad, Outlook
Also, you can use the wild cards for the process name.
Retrieve Process Objects With the Given Attributes
We can display the process object information for specific attributes when needed. Let’s retrieve only the
Process ID for the
Also, we can retrieve the CPU time attribute for the
NotePad process, as shown in the following.
Display the Process Owner
The default output of the
Get-Process command doesn’t display the
ProcessOwner attribute. But this can be a piece of valuable information when you need to terminate a given process.
We can use the
-IncludeUserName parameter to include the
ProcessOwner attribute in the output.
Get-Process -Name notepad -IncludeUserName