# encoding: ascii
# api: powershell
# title: Get-Process -eq PSList
# description: You can sort Get-Process cmdlet output in PSList style, of course if you has administrator privileges :) [My original post] (http://my.opera.com/samplez/blog/2013/03/18/get-process-eq-pslist)
# version: 0.1
# author: greg zakharov
# license: CC0
# x-poshcode-id: 4028
# x-archived: 2013-03-21T06:25:37
# x-published: 2013-03-18T17:44:00
#
#
ps | % -b {$arr = @()} -p {
$str = "" | select Name, PID, Time
$str.Name = $_.ProcessName
$str.PID = $_.Id
$str.Time = $(try {$_.StartTime} catch {return [DateTime]::MinValue})
$arr += $str
} -end {$arr | sort Time | ft -a}