# Out-Host and Out-File both work, but Out-Gridview doesn't

**URL:** <https://forums.powershell.org/t/out-host-and-out-file-both-work-but-out-gridview-doesnt/11729>\
**Category:** PowerShell Help\
**Created:** [November 30, 2018, 3:08am UTC](https://forums.powershell.org/t/out-host-and-out-file-both-work-but-out-gridview-doesnt/11729 "2018-11-30T03:08:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rtan2010](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rtan2010/32/1173_2.png) [@rtan2010](https://forums.powershell.org/u/rtan2010)\
**Post date:** [November 30, 2018, 3:08am UTC](https://forums.powershell.org/t/out-host-and-out-file-both-work-but-out-gridview-doesnt/11729/1 "2018-11-30T03:08:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [November 30, 2018, 3:41am UTC](https://forums.powershell.org/t/out-host-and-out-file-both-work-but-out-gridview-doesnt/11729/2 "2018-11-30T03:41:25Z")

</div>

Can you share the code and a sample CSV, That will help us to understand the problem.

---

<div class="post-metadata">

**Author:** ![rtan2010](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rtan2010/32/1173_2.png) [@rtan2010](https://forums.powershell.org/u/rtan2010)\
**Post date:** [November 30, 2018, 4:28am UTC](https://forums.powershell.org/t/out-host-and-out-file-both-work-but-out-gridview-doesnt/11729/3 "2018-11-30T04:28:08Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:33pm UTC](https://forums.powershell.org/t/out-host-and-out-file-both-work-but-out-gridview-doesnt/11729/4 "2024-05-16T20:33:37Z")

</div>


