PowerTip: Find Processes with Process ID Less Than 1000

Summary: Use Windows PowerShell to find processes with a process ID that is less than 1000.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find all processes that have a process ID less than 1000?

Hey, Scripting Guy! Answer Use the Get-Process cmdlet, pipe the resulting objects to the Select-Object cmdlet, choose the process name,
          and create a custom property that displays True if the process ID is less than 1000:

Get-Process | select name, @{L='Pid below 1000';E={$_.pid -lt 1000}}

Comments (1)

  1. James A. Brown says:

    Shouldn’t this be: Get-Process | select name, @{L=’Pid below 1000′;E={$_.id -lt 1000}} ?

    Piping Get-Process into Get-Member, I don’t see a Property called ‘pid’. Only ‘id’. Using ‘pid’ gets me identical results no matter what value I use.

Skip to main content