Home » PowerShell Get Process Name

PowerShell Get Process Name

The Get-Process cmdlet in PowerShell is used to retrieve information about running processes on your system, it has the process name as one of the primary properties. Using the Name parameter in the Get-Process cmdlet, you can get the process name.

In this article, we will discuss how to get a process name, using a wildcard character to get a process name.

How to Get Process Name in PowerShell

Using the Get-Process cmdlet in PowerShell, you can get the process name. Use the Name parameter to specify the exact process name you want to retrieve.

Get-Process -Name "explorer"

In the above PowerShell script, the Get-Process cmdlet uses the parameter Nameexplorer‘ and retrieve the process name.

The output of the above PowerShell script to filter process name and extract the exact process name is:

PowerShell Get Process Name
PowerShell Get Process Name

How to Display Process Names with Wildcard Characters

PowerShell supports wildcard characters like * and ? for more flexible searches. To get all process names that start or begin with “notepad”, use the following script.

Get-Process -Name "notepad*"

The above PowerShell script will retrieve all processes with names like “notepad”.

The output of the above PowerShell script not only displays the processes but also filters them.

PS C:\> Get-Process -Name "notepad*"   
                                                                                  
Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    247      14     3364      12780       8.98   2448   1 notepad
    249      15     3292      10964       0.39  21816   1 notepad
    250      15     3344      12060       4.11  35568   1 notepad


PS C:\>     

Cool Tip: How to get process id using PowerShell!

Get All Process Where Names like

You can get a list of all process names where names like or contains partial names or certain patterns. We will use the wildcard character * for more flexible searches.

 Get-Process a*   

In the above PowerShell script, the command Get-Process returns all processes with names starting with “a”.

The output of the above script is:

PS C:\> Get-Process a*                                                                                                  
Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    792      55    35124      37944   1,941.97   9792   0 acumbrellaagent
    166      13    11888       8348       0.25  17560   1 ai
    170      12     2440       6760     465.02   6164   1 ApMsgFwd
    174      12     2360       6744       0.34  11408   1 ApntEx
    325      18     3900      11704      49.66   4080   1 Apoint
    404      25    17300      19856       6.16  14436   1 ApplicationFrameHost
    146       9     1732       5268       0.09  11296   1 ApRemote
    160      10     2444       4520       0.36   5184   0 armsvc
    173      11     2152       5552       0.55   5252   0 atashost
    832      55    77248      21388     127.28  15504   1 atmgr


PS C:\>          

Cool Tip: How to use the Start-Process to open a URL in Browser in PowerShell!

Conclusion

I hope the above article on how to get process names in PowerShell using the Get-Process cmdlet is helpful to you.

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