Navigation :
Custom Objects
Examples
Get all processes and create a new object layout. Create a object Runtime by calculating the runtime from the start time.
get-process | where starttime |
Select ID,Name,Starttime,
@{Name="RunTime";Expression={(Get-Date) - $_.StartTime}} |
Sort RunTime