August 22nd, 2012

PowerTip: Measure the Time for a Command to Complete

Doctor Scripto
Scripter

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

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.