我正在尝试通过批处理文件执行 powershell 脚本并不断收到以下警告;
-> 执行策略设置为远程签名;我也用 Unrestricted 测试过,同样的错误出现了;如何摆脱这个?
最佳答案
您的 ps1 脚本是否位于网络共享中?您可以通过在管理员 powershell 控制台中键入 set-executionpolicy bypass
来跳过所有安全过程
或者您可以通过 powershell.exe -executionpolicy bypass -file\\servername\share\script.ps1
调用您的脚本
关于windows - 如何摆脱 Batch/Powershell 中的安全警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14817141/