Equivalent of 'more' or 'less' command in Powershell?

后端 未结 12 2049
小蘑菇
小蘑菇 2020-12-13 01:38

Is there a way to paginate the output by piping it to some \'more\' command, which is available in linux\\unix shells?

12条回答
  •  天命终不由人
    2020-12-13 01:49

    I had exactly this question (well I wanted less, not more) and found the answer of @richard-berg worked for me, being new to PowerShell (but not to Linux), I found the things missing from that answer (for me) were: I first needed to go:

    Find-Package pscx | Install-Package

    which then prompted for "installing nuget package". I did this but then had to use the
    -AllowClobber parameter on Install-Package.

    then in order to use less, I had to:

    Set-ExecutionPolicy RemoteSigned

    which all worked :-)

提交回复
热议问题