PowerTip: Find Processes with Process ID Less Than 1000

PowerTip: Find Processes with Process ID Less Than 1000

  • Comments 2
  • Likes

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}}

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • 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.