![](/img/trans.png)
[英]How can I bypass execution policy when running scripts from Powershell ISE
[英]How to set the execution policy for the powershell_ise when it is launching?
PowerShell 4.0
當powershell
主機啟動時,可以為進程scope 設置執行策略。 例如:
powershell -executionpolicy bypass
我想為powershell_ise
主機做同樣的事情,但它沒有ExecutionPolicy
鍵。 是否存在為該主機設置執行策略的類似方法(可能通過其他方式而不是密鑰)?
PS當然,當powershell_ise
啟動時,我可以手動鍵入此cmdlet
,但我想在我的桌面上創建單獨的label ,以便在需要時使用此設置啟動powershell_ise
。
流程范圍執行策略由PSExecutionPolicyPreference
環境變量控制。 您可以在啟動PowerShell ISE之前將此環境變量設置為所需的值。
需要幫助將所有 ExecutionPolicies 設置為“Restricted enter image description here
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.