Modern Alternative to More

by Jun 9, 2017

In a PowerShell console, you can continue to pipe to more, just like in cmd.exe, to view results page by page. However, more does not support real-time pipelining, so all data needs to be collected first. This can take a long time and burn much memory:

dir c:\windows -Recurse -ea 0  | more

A better way is to use PowerShell’s own paging mechanism:

dir c:\windows -Recurse -ea 0  | Out-Host -Paging

Note that this all requires a true console window. It won’t work in graphical hosts.

Twitter This Tip! ReTweet this Tip!