PowerTip: Measure the Time for a Command to Complete

Doctor Scripto

Summary: Learn how to measure the time for a Windows PowerShell command to complete.

Hey, Scripting Guy! Question How can I see how many seconds it takes to retrieve objects from the application log?

  Hey, Scripting Guy! Answer

 (Measure-Command { Get-EventLog application }).totalseconds


Discussion is closed.

Feedback usabilla icon