使PowerShell窗口消失



我做了一个PowerShell备份脚本。我还为它制作了一个 GUI。现在我希望GUI后面的PowerShell窗口在脚本过程中消失。

有没有一个简单的命令,或者我该如何实现?

使用隐藏参数启动PowerShell -windowsstyle即:

powershell.exe -noprofile -windowstyle hidden -executionpolicy bypass -NonInteractive -file .script.ps1

最新更新