In this tutorial, I will explain how to use the PowerShell Get-Process cmdlet to manage and monitor processes on your computer. As a developer, I once faced an issue where a rogue process consumed excessive CPU resources, causing significant slowdowns. This tutorial will help you understand how to identify and manage such processes effectively using PowerShell’s Get-Process cmdlet.
To use PowerShell Get-Process, simply open PowerShell and type Get-Process to list all running processes. For specific processes, use Get-Process -Name “ProcessName”, replacing “ProcessName” with the desired process name. You can also filter, sort, and select specific properties using additional cmdlets like Sort-Object and Select-Object to manage processes more effectively.
PowerShell Get-Process Cmdlet
The Get-Process cmdlet in PowerShell retrieves information about the processes running on your local computer. It lists all the processes by default, but you can filter and format the output to suit your needs.
Basic Usage
To get a list of all running processes, simply open PowerShell and type:
Get-ProcessThis command will display a table with details like the process name, ID, CPU usage, and memory usage.
Here is the output you can see in the screenshot below:

Check out PowerShell Compare-Object
Filter Processes by Name
If you want to find a specific process, such as notepad, you can filter the results by name using the Get-Process cmdlet.
Get-Process -Name notepadThis command will return all instances of the Notepad process running on your computer.
Here is the exact output you can see in the screenshot below:

Using Wildcards
You can also use wildcards to search for processes. For example, to find all processes that start with “chrome,” you can use:
Get-Process -Name chrome*This is particularly useful when you’re not sure of the exact process name.
Check out PowerShell Select-Object
Sort Processes
To sort processes by a specific property, such as CPU usage, you can use the Sort-Object cmdlet:
Get-Process | Sort-Object CPU -DescendingThis command will list all processes sorted by CPU usage in descending order, helping you quickly identify the most resource-intensive processes.
I executed the above script, and you can see the exact output in the screenshot below:

Display Specific Properties
Sometimes, you might only be interested in certain properties of a process. You can use the Select-Object cmdlet to specify which properties to display:
Get-Process | Select-Object Name, CPU, IdThis command will display only the process name, CPU usage, and process ID.
Check out PowerShell Copy-Item
Stop a Process
If you identify a process that is causing issues, you can stop it using the Stop-Process cmdlet. For example, to stop a process by name:
Stop-Process -Name notepadOr by process ID:
Stop-Process -Id 1234Get Processes on a Remote Computer
You can also retrieve processes from a remote computer using the -ComputerName parameter. For example, to get processes from a computer named Server01:
Get-Process -ComputerName Server01Ensure you have the necessary permissions and that remote management is enabled on the target computer.
Check out PowerShell Write-Output
Real-World Example: Managing Processes in a Corporate Environment
Consider a scenario where you are an IT administrator for a company in San Francisco. You notice that several users are experiencing slow performance due to a resource-heavy application.
You can quickly identify and manage these processes using PowerShell across multiple computers.
Here is the complete PowerShell script.
$computers = @("Workstation01", "Workstation02", "Workstation03")
foreach ($computer in $computers) {
Get-Process -ComputerName $computer | Sort-Object CPU -Descending | Select-Object -First 5
}This script retrieves the top 5 CPU-consuming processes from each specified workstation, allowing you to take appropriate action.
Conclusion
The Get-Process cmdlet in PowerShell is used to manage and monitor processes on your computer. You can use the Get-Process cmdlet to troubleshoot performance issues or manage processes across a network. I hope you now understand how to use the PowerShell Get-Process cmdlet with a few useful examples.
You may also like:
- PowerShell Write-Host vs Out-Host
- PowerShell Write-Host vs Write-Information
- PowerShell Write-Host vs Write-Error
Bijay Kumar is an esteemed author and the mind behind PowerShellFAQs.com, where he shares his extensive knowledge and expertise in PowerShell, with a particular focus on SharePoint projects. Recognized for his contributions to the tech community, Bijay has been honored with the prestigious Microsoft MVP award. With over 15 years of experience in the software industry, he has a rich professional background, having worked with industry giants such as HP and TCS. His insights and guidance have made him a respected figure in the world of software development and administration. Read more.