Today Thomas Rayner’s post on Get-History reminded me of a one liner I use to calculate time spent on the last command.
1 |
(Get-History)[0].EndExecutionTime - (Get-History)[0].StartExecutionTime |
1 2 3 4 5 6 7 8 9 10 11 |
Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 87 Ticks : 870022 TotalDays : 1.00696990740741E-06 TotalHours : 2.41672777777778E-05 TotalMinutes : 0.00145003666666667 TotalSeconds : 0.0870022 TotalMilliseconds : 87.0022 |
You…