PowerTip: Time How Long PowerShell Command Takes to Complete


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}

Comments (0)

Skip to main content