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 lists 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.
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 in PowerShell
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 in PowerShell
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}
Output:
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!
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.