Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PowerShell命令管道,将在get Childitem-Recurse期间暂停_Powershell_Get Childitem - Fatal编程技术网

PowerShell命令管道,将在get Childitem-Recurse期间暂停

PowerShell命令管道,将在get Childitem-Recurse期间暂停,powershell,get-childitem,Powershell,Get Childitem,我正在审核用户上的所有文件内容,并正在使用PowerShell命令获取childitems,但希望看到暂停结果并等待我按任意键继续的选项 Get Childitem-递归|PowerShell命令行 在PowerShell命令行中,您可以通过more或Out主机分页来传递命令 Get-ChildItem -Recurse | Out-Host -Paging #Alias version gci -rec | oh -Paging 每页最后一行显示如下: <SPACE> next

我正在审核用户上的所有文件内容,并正在使用PowerShell命令获取childitems,但希望看到暂停结果并等待我按任意键继续的选项

Get Childitem-递归|

PowerShell命令行 在PowerShell命令行中,您可以通过
more
Out主机分页来传递命令

Get-ChildItem -Recurse | Out-Host -Paging

#Alias version
gci -rec | oh -Paging
每页最后一行显示如下:

<SPACE> next page; <CR> next line; Q quit
下一页;下一行;Q退出
允许您逐页浏览输出

PowerShell ISE
此链接提供了更多信息,似乎在脚本环境中是不可能的:

您的意思是在
Get ChildItem
中途暂停,还是在它收集数据之后暂停?这里有一些有趣的答案。基于这样一种想法:将Linux命令管道化到
更多
更少
,这就是您要寻找的:非常感谢您的回复-这就是我一直在寻找的。