PowerTip: Determine How Long a PowerShell Command Takes

Summary: Figure out how long a Windows PowerShell command takes to run. 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? Use the Measure-Command cmdlet and specify the code in the –expression script block. Measure-Command -Expression {G...