March 2nd, 2013

PowerTip: Use PowerShell to Return Only Processes that Display a Start Time

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to display processes that return a StartTime property value.

Hey, Scripting Guy! Question How can I filter process information so that only processes that return a StartTime display?

Hey, Scripting Guy! AnswerUse Where-Object with the Get-Process cmdlet. Then filter on StartTime.

Get-Process | ? starttime | select name, starttime

 The following command uses Windows PowerShell 2.0 syntax:

Get-Process | ? { $_.starttime} | select name, starttime

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback