简体   繁体   English

控制台中的Remove-AppxPackage嘈杂

[英]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.

相关问题 所有用户的 Remove-AppxPackage - Remove-AppxPackage for all users Powershell在启动时运行但未执行Remove-AppxPackage - Powershell is running at startup but not executing Remove-AppxPackage Remove-AppxPackage 失败,错误为 0x80070002 - Remove-AppxPackage fails with error 0x80070002 使用 Get-AppxPackage/Remove-AppxPackage 将包排除(foreach-notlike)列入白名单 - Whitelisted package exclusion (foreach-notlike) with Get-AppxPackage/Remove-AppxPackage C# - PowerShell 对象成功执行 Remove-AppxPackage 但无法从其他用户删除应用程序 - C# - PowerShell object execute Remove-AppxPackage successfully but unable to remove application from another user 如何创建由批处理命令执行的Powershell脚本Remove-appxpackage Windows内置应用程序? - How to Create Powershell Script Remove-appxpackage Windows Built-in App Executed by Batch Command? Get-Help 显示 Remove-AppxPackage 的 `-AllUser` 参数,那么为什么 cmdlet 不接受它呢? - Get-Help shows `-AllUser` parameter for Remove-AppxPackage, so why won't the cmdlet won't accept it? 从 Windows 10(和任何其他 Appxpackage)中删除 Webp 图像扩展 - Remove Webp image extension from Windows 10 (and any other Appxpackage) 使用C#调用Powershell Cmd进行Add-AppxPackage Remove-AppPackage - Invoke Powershell Cmd for Add-AppxPackage Remove-AppPackage using C# 检查是否安装了较新版本的AppxPackage - Check if newer Version of AppxPackage is installed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM