Created
March 19, 2019 17:28
-
-
Save SQLvariant/470e35101ef37bab64e08d5a1b46d1ff to your computer and use it in GitHub Desktop.
Simple function to give you the duration of all command history in PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-History2 | |
{ | |
Get-History | | |
SELECT Id, @{Label="TotalRunningTime";Expression={$_.EndExecutionTime - $_.StartExecutionTime}}, CommandLine, ExecutionStatus, StartExecutionTime, EndExecutionTime | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment