![](/img/trans.png)
[英]powershell -NonInteractive -ExecutionPolicy bypass -Command
[英]PowerShell ExecutionPolicy Change Bypass
只有三種方法可以做到這一點:
選項1:
Set-ExecutionPolicy $POLICY -Force
Restricted
-無法運行任何腳本。 Windows PowerShell只能在交互模式下使用。
AllSigned
僅可運行由受信任的發布者簽名的腳本。
RemoteSigned
下載的腳本必須RemoteSigned
受信任的發布者簽名,然后才能運行。
Unrestricted
-無限制; 所有Windows PowerShell腳本都可以運行。
選項2:
選項3:
在.bat文件中運行跟蹤
powershell.exe -executionpolicy bypass -windowstyle hidden -noninteractive -nologo -file "name_of_script.ps1"
希望這可以幫助您找到所需的答案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.