Measure-Command { .\do_something.ps1 } Note that one minor downside of Measure-Command is that you see no stdout output. If you want to see the output, then you can use the .NET Stopwatch object e.g.:
$sw = [Diagnostics.Stopwatch]::StartNew() .\do_something.ps1 $sw.Stop() $sw.ElapsedRead full article from time - Timing a command's execution in PowerShell - Stack Overflow
No comments:
Post a Comment