I have a PowerShell script like this:
$owners = @{}
gwmi win32_process |% {$owners[$_.handle] = $_.getowner().user}
get-process | select processname,Id,StartTime,@{l="Owner";e={$owners[$_.id.tostring()]}}
I'd like to format the StartTime to appear as 24h format and dont show the seconds. How do I do that?