Consider the following code:
$a = @()
$b = "" |select ho_ho,ha_ha
$b.ho_ho = "1"
$b.ha_ha = "2"
$a+=$b
$b = "" |select ho_ho,ha_ha
$b.ho_ho = "3"
$b.ha_ha = "4"
$a+=$b
$a | Format-Table -AutoSize
$a | Out-GridView
Using Format-Table, the underscores on the column headers are retained.
ho_ho ha_ha
----- -----
1 2
3 4
However, when using Out-Gridview, the underscores are automatically removed?
Does anyone know how to avoid this?