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

1 year, 9 months ago.

  • Author
  • #71026

    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

    Points: 41
    Rank: Member

    Found on:

    $formatEnumerationLimit = -1
    $o | fl

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

  • #71050

    Points: 1
    Rank: Member

    Brilliant, thanks!

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

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort