PowerShell: Use Get-Process to Search for Process by Name


You can use the Get-Process cmdlet in PowerShell to get all processes that are running on the local computer.

Often you may want to use the Get-Process cmdlet to search for a specific process by name.

You can use the following methods to do so:

Method 1: Search for Process by Exact Name

Get-Process -Name AggregatorHost

This particular example will only display the results for the process named AggregatorHost.

Method 2: Search for All Process that Contain String

Get-Process -Name *background*

This particular example will display the results for all processes that contain background in the name of the process.

The following examples show how to use each of these methods in practice.

Example 1: Use Get-Process to Search for Process by Exact Name

We can use the following syntax with the Get-Process cmdlet in PowerShell to only display the process with the exact name of AggregatorHost:

Get-Process -Name AggregatorHost

The following screenshot shows how to use this syntax in practice:

PowerShell Get-Process by name

This only returns results for the process with the exact name of AggregatorHost.

Example 2: Use Get-Process to Search for All Processes that Contain String

We can use the following syntax with the Get-Process cmdlet in PowerShell to only display the processes that contain background somewhere in the process name:

Get-Process -Name *background*

The following screenshot shows how to use this syntax in practice:

PowerShell get all processes that contain string

This returns results for all processes that contain background somewhere in the process name.

Note: You can find the complete documentation for the Get-Process cmdlet in PowerShell here.

Related Tutorials

The following tutorials explain how to perform other common tasks in PowerShell:

PowerShell: How to Use Get-Service and Filter Results
PowerShell: How to Use Get-Service to Check Status of Service
PowerShell: How to Use Get-Service to Get Startup Type of Service

Leave a Reply