ps/Modules/Cole.PowerShell.Developer/Scratch/Find-LastExecutionTime.ps1

4 lines
191 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
function Find-LastExecutionTime {
$lastCommand = Get-History -Count 1
if($lastCommand) { ($lastCommand.EndExecutionTime - $lastCommand.StartExecutionTime).TotalMilliseconds ("ms") }
}