![](/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.