Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个调用 CmdLet 的 PowerShell 脚本,该脚本又使用 Write-Progress 报告其进度,我想隐藏进度条。 是否可以抑制或重定向 Write-Progress CmdLet 的输出?
在调用利用 Write-Progress 的 cmdlet 之前尝试设置此首选项变量:
$ProgressPreference = 'SilentlyContinue'
之后您可能希望恢复为“继续”。