Format-Table -Autosize is great but when used with -GroupBy, the columns width is computed group by group, not for the whole thing.

My idea was to $tmp = $data | Format-Table -Autosize, retrieve the computed columns width from $tmp, build a hash table describing the columns with their width and then $data | Sort-Object <column> | Format-Table $hash -GroupBy <column>

But despite many attempts to Google Format-Table result structure and $tmp | Get-Member I can not find the information I'm looking for.

Do you have any clue ?

0 Answers