Was hoping PowerShell had a nifty thing to get the max valued element of an int array... of course not...

[int]$n=$null;[int]$v=0;[int]$i=0;$array | foreach { if($_ -gt $v) {$n=$i;$v=$_;})

No... I don't write this sloppy normally  ;) https://t.co/ezFVTaW7gy