Using the Measure-Command Cmdlet

Here is an example of using Measure-Command to gather the execution time for loading the SQL Error log into a Out-GridView object:

which displays:

An even better way, since using Measure-Command with prohibit output to Write-Host is to use a .Net timer. Her’s how to implement that:

Views – 1744