Formatting console output

This topic contains 2 replies, has 2 voices, and was last updated by  Ritmo2k 5 months ago.

  • Author
    Posts
  • #71026

    Ritmo2k
    Participant

    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
    
  • #71042

    Matt Bloomfield
    Participant

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

    $formatEnumerationLimit = -1
    $o | fl
    

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

  • #71050

    Ritmo2k
    Participant

    Brilliant, thanks!

You must be logged in to reply to this topic.