Pause on large output to console

Welcome Forums General PowerShell Q&A Pause on large output to console

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

2 years, 11 months ago.

  • Author
  • #34249

    Points: 0
    Rank: Member

    If you produce a lot of output, is there a way to pause it when it fills the console window up and prompt for a keystroke to continue to see the next section of output? Such as like when doing a linux help file?

  • #34250

    Points: 1,785
    Helping HandTeam Member
    Rank: Community Hero

    Run the script an pipe it to more.

    c:\myscript.ps1 | more

  • #34299

    Points: 0
    Rank: Member

    Well, I'm actually trying to do it withint a script like, in this case I"m displaying all vmware datastores that are available and letting the user pick which one to reside a VM on.

    Sometimes that list can be in the hundreds which would spill off the console, i was wondering if it was possible to pause in that output. If not I figure my other option is to like, display only the top 50 items or so.

The topic ‘Pause on large output to console’ is closed to new replies.