例如,命令:
get-help about_commonparameters
每次输出都会直接滚动到底部,我不得不每次都要向上滚动才能阅读。是否有任何命令来分页查看PowerShell输出,当输出内容过长时?
get-help about_commonparameters
每次输出都会直接滚动到底部,我不得不每次都要向上滚动才能阅读。是否有任何命令来分页查看PowerShell输出,当输出内容过长时?
你可以将你的命令通过管道符号传送到 More
get-help about_commonparameters | More
或者使用 Out-Host -Paging
get-help about_commonparameters | Out-Host -Paging
help
而不是get-help
,它将默认分页显示(因为它是一个特殊的内置函数,而不是直接的别名)。还要注意,在ISE控制台中根本无法使用分页显示(无论是通过help
还是通过| more
都不支持)。 - Mark Wragg