One thing many users complain about with PowerShell is that it isn’t always scrolling properly. Windows PowerShell might be incredibly versatile, but encountering major difficulties with basic functions like scrolling makes some users second-guess the very purpose of using it.
That’s what people are stating over forums:
For some reason I don’t get any vertical scrollbars in powershell, and I cannot scroll up to see any commands or output after they’ve gone out of view.
This is driving me mad. I can’t see the output from my commands if it doesn’t all fit on the screen at once.
This can be an issue that takes some serious time to get past for some PowerShell users. That’s why we’ve created this guide that will give detailed information on the matter.
What can I do when PowerShell will not scroll?
1. Increase the Screen Buffer Height
- While in a PowerShell session, right-click the upper left corner.
- Select Properties.
- Up next, select the Layout tab.
- Change the height of the Screen Buffer Size.
- Confirm the change by clicking OK.
First of all, you need to increase the Height in Screen Buffer Size. Just set it to something over 1000 – the choice is all yours – then, experiment with a value that works for you.
Remember this value you’re setting now controls how far you can scroll vertically after a command has finished running. Finally, let us add something that might just sound like music to your ears – the larger the number, the further the scrolling can get before data is overwritten.
The maximum you can scroll on a PowerShell window though is of no more than 9999 lines.
2. Use the More command
As you might already know, this is a legacy command-line tool that pages the output one screen at a time. It was originally intended as a way to page through large text files, so all you need to do is run your command and pipe it to More:
PS Scripts:> get-process | moreg
A break is found at the end of each page:
398 19 4796 11920 107 1.59 1628 OpenDNSUpdater
143 8 3196 10980 46 2.93 4896 OSPPSVC
767 73 176020 197744 820 29.23 4192 powershell
— More —
Next, choose one of the following options:
- Press Enter – it will advance one line of data at a time.
- S – this will skip the next X number of lines.
- Space bar – it will advance to the next page.
- P – you will be prompted for the next X number of lines to advance.
- F – it will display the next file or page of data.
- Q – Quit.
3. Make sure all actions you perform in a session are logged to the log file
If you want to enjoy extra space in a session, we have a quick tip for you. Open a new session, then provide this command:
Start-Transcript -Path “[YourPath]PowershellSession.log”
This will ensure all the actions you perform and see in the window are logged to the log file.
By following these procedures, you should be able to fix any issue related to PowerShell being unable to scroll properly.
If you enjoyed this tutorial, then you’ll also like to read more about other fixes for some of the most common PowerShell errors.