PowerTip: Time How Long PowerShell Command Takes to Complete

Doctor Scripto

Summary: Easily time how long a Windows PowerShell command takes to complete.

Hey, Scripting Guy! Question How can I time how long a command takes to complete in Windows PowerShell?

Hey, Scripting Guy! Answer Use the Measure-Command cmdlet—for example, to time how long it takes to Get-Process (gps is an alias)
           to complete, put the command in a script block and call Measure-Command:

Measure-Command {gps}


Discussion is closed.

Feedback usabilla icon