How to enable Out-GridView in a function.
I mean,
"Hello" | Out-GridView
Works.
But if I have a simple function like this
function Count ([int]$times)
{
for ($i=1; $i -le $times;$i++)
{
Write-Host $i
}
}
Why calling Count 5
doest not support a pipe to Out-GridView?