Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Determine How Long a PowerShell Command Takes

$
0
0

Summary: Figure out how long a Windows PowerShell command takes to run.

Hey, Scripting Guy! Question You want to know how long a particular Windows PowerShell command takes to run so you can optimize your code. How can you do this?

Hey, Scripting Guy! AnswerUse the Measure-Command cmdlet and specify the code in the –expression script block.

Measure-Command -Expression {Get-Process}

 


Viewing all articles
Browse latest Browse all 3333

Trending Articles