Author Posts

May 18, 2017 at 7:54 pm

I have a collection of PSObjects that I write to the console through Sort-Object. One of the fields is multi valued, is it possible to force the display to expand the variable and make it wrap?

PS K:\> $seq = 1..1000
PS K:\> $o = New-Object PSObject -Property @{One=1;Two=2;Seq=$seq}
PS K:\> $o |fl


One : 1
Seq : {1, 2, 3, 4...}
Two : 2

May 18, 2017 at 9:03 pm

Found on:
https:// greiginsydney.com/viewing-truncated-powershell-output/

$formatEnumerationLimit = -1
$o | fl

Edit: broke the link to stop the WP site embedding.

May 18, 2017 at 9:36 pm

Brilliant, thanks!