Learn about Windows PowerShell
Summary: Use the More function to display Windows PowerShell information one page at a time.
How can you cause Windows PowerShell to easily display information one console screen at a time?
Use the More function:
Get-Command –Command cmdlet | select name, module | more
Wow, the More function is cool. Can I use that inside the Windows PowerShell ISE?
No. You can only use the More function inside the Windows PowerShell console.
By the way, how did you know that More was a function, not a cmdlet or a native command?
Use the Get-Command cmdlet:
Get-Command more
I want to know 'more'
Instead of more, I prefer using the out-host -paging command.
Avantage is that you don't have to wait for powershell to execute the whole command and wait to display.
This is useful for huge outputs.
for ex : Measure-Command {Get-Command -Command cmdlet | select name, module | more} --> 291ms
Measure-Command {Get-Command -Command cmdlet | select name, module | out-host -paging} --> 118ms
I agree with Cisco. Note that out-host -paging has the same limitation as more within the ISE. If you try, you get the following error:
out-lineoutput : The method or operation is not implemented.
+ CategoryInfo : NotSpecified: (:) [out-lineoutput], NotImplementedException
+ FullyQualifiedErrorId : System.NotImplementedException,Microsoft.PowerShell.Commands.OutLineOutputCommand