Formatting console output

Welcome Forums General PowerShell Q&A Formatting console output

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
1 year, 5 months ago.

  • Author
    Posts
  • #71026

    Participant
    Points: 1
    Rank: Member

    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

    Participant
    Points: 4
    Rank: Member

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

    $formatEnumerationLimit = -1
    $o | fl
    

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

  • #71050

    Participant
    Points: 1
    Rank: Member

    Brilliant, thanks!

The topic ‘Formatting console output’ is closed to new replies.