Finding new processes

by Apr 28, 2011

Get-Process will return a list of all processes. If you just want to see those started within the last 10 minutes, you can check StartTime. Both lines will return processes that have been started within the past 10 minutes:

PS> Get-Process | Where-Object { try { (New-Timespan $_.StartTime).TotalMinutes -le 10} catch { $false } }
PS> Get-Process | Where-Object { trap { continue }  (New-Timespan $_.StartTime).TotalMinutes -le 10 }

Note that you need Administrator privileges to read all process information. As a regular user, some information is only available for processes you started yourself.

 

 

Twitter This Tip!
ReTweet this Tip!