PowerShell 技能连载 - Showing Progress in Taskbar Buttons

如果您在 Windows 上运行 PowerShell 脚本,则可以将任务栏按钮用作进度指示器。您需要的只是安装此模块:

1
Install-Module -Name PsoProgressButton -Scope CurrentUser

接下来,您可以运行下面的命令以将任务栏按钮内的进度栏设置为 0 到 100 之间的值。这段代码将指示器设置为 50%:

1
PS> Set-PsoButtonProgressValue -CurrentValue 50

要关闭指示器,请运行以下代码:

1
PS> Set-PsoButtonProgressState -ProgressState NoProgress

PowerShell 技能连载 - Showing Progress in Taskbar Buttons

http://blog.vichamp.com/2023/01/03/showing-progress-in-taskbar-buttons/

作者

吴波

发布于

2023-01-03

更新于

2024-03-29

许可协议

评论