Welcome › Forums › General PowerShell Q&A › Out-Host and Out-File both work, but Out-Gridview doesn't
This topic contains 2 replies, has 2 voices, and was last updated by
I have a very simple PS script which ends in outputting a CSV file.
When I am testing such outputs (CSV), I usually use Out-Gridview (or Out-Host) to see the results quickly and then change the script to Out-File when the code is "truly final".
For this script (not shown) when I use Out-Host or Out-File, I get the exact correct results.
But when I use Out-Gridview, I get nothing, i.e., no screen displays and the script just returns to the PS prompt.
The CSV file is just 4 columns (fields) and well under 80 characters total.
Is there a reason for this behavior?
Would be grateful for any tips, advice or suggestions.
Can you share the code and a sample CSV, That will help us to understand the problem.
My apologies Mr Kvprasoon.
Out-Gridview was working. It was the fact that its window was hidden behind the VS Code window which took up the whole screen and escaped my attention. Everything is working fine. Sorry!
You must be logged in to reply to this topic.