Home » How to Get Process List in PowerShell

How to Get Process List in PowerShell

The `Get-Process` cmdlet in PowerShell gets a list of all active processes running on the local computer.

Get-Process

The output of the above command list the processes in the PowerShell terminal. It displays the Handles, NPM(K), PM(K), WS(K), CPU(s), Id, SI, and ProcessName for the process.

PowerShell Process List
PowerShell Process List

A process is an instance of a program in execution. Using the Get-Process cmdlet you can perform various tasks such as listing all processes, filtering processes, getting process information, and starting and stopping processes.

How to List All Processes

To get a list of all processes running on the local system, use the Get-Process cmdlet.

Get-Process

The above PowerShell command Get-Process will display a table of processes containing information such as Process name, Id (Process ID), CPI, and memory usage.

How to Filter Processes

You can use Where-Object cmdlet in PowerShell to filter processes based on specific criteria. For instance, to filter processes by their CPU usage exceeds a certain threshold:

 Get-Process | Where-Object { $_.CPU -gt 50} 

The above PowerShell Get-Process command will list processes consuming more than 50% of the CPU.

Cool Tip: How to get a process name in PowerShell!

How to Get Process Information

The Get-Process retrieves the information about the running process on the system. For instance, the following PowerShell script retrieves detailed information about a particular process using its id.

Get-Process -Id 5888 

In the above PowerShell script, the Get-Process command get process information by Id.

The output of the above script displays information about a process.

PS C:\> Get-Process -Id 5888                               
                                                             
Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    149      10     2108       5956       1.36   5888   0 mosquitto


PS C:\>      

Cool Tip: How to get process id using PowerShell!

Conclusion

I hope the above article on how to get all the processes running on the local computer using the PowerShell Get-Process cmdlet is helpful to you.

You can find more topics about Active Directory tools and PowerShell basics on the ActiveDirectoryTools home page.

Leave a Comment