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

 
Participant
3 years, 4 months ago.

  • Author
    Posts
  • #34249

    Participant
    Topics: 50
    Replies: 86
    Points: 1
    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

    Keymaster
    Topics: 13
    Replies: 4872
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Run the script an pipe it to more.

    c:\myscript.ps1 | more

  • #34299

    Participant
    Topics: 50
    Replies: 86
    Points: 1
    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.

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