Trucate output view?

Welcome Forums General PowerShell Q&A Trucate output view?

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

 
Participant
8 months, 1 week ago.

  • Author
    Posts
  • #95166

    Participant
    Points: 0
    Rank: Member

    Is it possible to truncate the output view so i can choose how many characters to display? Substring wont work, as i want to keep the objects in the pipeline. Only want to truncate the display.
    Take a look at how the output looks for now:
    https://twitter.com/greiginsydney/status/969671584771317760

  • #95179

    Keymaster
    Points: 1,619
    Helping HandTeam Member
    Rank: Community Hero

    Somewhat related, https://powershell.org/forums/topic/truncated-output/#post-95178.

    Yes, but to do this the right way you need to build your code as a function, in a module, and pair that module with a custom formatting view. I cover that in a variety of books I've written ;).

    • #95214

      Participant
      Points: 0
      Rank: Member

      You learn something new about PowerShell every day 🙂
      Thanks for pointing us in the right direction.

The topic ‘Trucate output view?’ is closed to new replies.