I ran this test a series of times in succession using Measure-Object, then counted the average number for seconds and milliseconds among all the Measure-Object runs. This was on a Windows 8.1 x64 machine with PS4.0
$Seconds = @()
$Milliseconds = @()
$MaxRuns = 10;
foreach($i in 1..$MaxRuns)
{
$e = Measure-Command {1..10 | Out-GridView}
$Seconds += $e.Seconds
$Milliseconds += $e.Milliseconds
}
Write-Host "Average number of seconds among $MaxRuns runs: "+ $($Seconds | Measure-Object -Average).Average
Write-Host "Average number of milliseconds among $MaxRuns runs: " + $($Milliseconds | Measure-Object -Average).Average
My results:
Average number of seconds among 10 runs: + 0
Average number of milliseconds among 10 runs: + 54.1
I find myself having the same issue for the last few days. I am Win7 SP1 (x64), but also seeing the same behavior from (some) servers too? Here are my results:
Average number of seconds among 10 runs: + 30
Average number of milliseconds among 10 runs: + 206.2
It is annoying because I use out-gridview constantly. Something definitely changed. Anyone figure out what?