[英]Remove-AppxPackage noisy in the console
I am working on automating Remove-AppxPackage
and it works fine, but even when using 我正在自动执行
Remove-AppxPackage
,它工作正常,但即使使用
Remove-AppxPackage $appXPackage -allUsers:$allUsers -errorAction:stop > $null
I am seeing some junk in the console. 我在控制台中看到一些垃圾。 Something of a progress indicator, with a sequence of
o
's one screen, but it doesn't remain after processing. 进度指示器,带有
o
的一个屏幕序列,但在处理后不会保留。 It's just ugly during processing. 处理过程中很难看。 Is there some way to make it quiet, or am I stuck with ugly?
有什么办法可以使它安静,还是我被丑陋困住了?
EDIT: I revised the code for the verbose argument, thus: 编辑:我修改了详细参数的代码,因此:
Remove-AppxPackage $appXPackage -allUsers:$allUsers -verbose:$false -errorAction:stop > $null
and I am still getting processing artifacts on screen, as you see here. 正如您在此处看到的,我仍然在屏幕上得到处理工件的信息。
it should be | Out-Null
它应该是
| Out-Null
| Out-Null
at the end and if you don't want to see the verbose output use -verbose:$false
| Out-Null
,如果您不想看到详细的输出,请使用-verbose:$false
to remove the progress indication during the execution of the commands you can use this: 要在执行命令期间删除进度指示,可以使用以下命令:
$progressPreference = 'SilentlyContinue'
place this before the code that is displaying progress bar. 将其放在显示进度栏的代码之前。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.