PowerShell 4.0
可以在powershell
主机启动时为进程范围设置执行策略。例如:
powershell -executionpolicy bypass
我想对powershell_ise
主机执行相同操作,但它没有ExecutionPolicy
密钥。是否存在该主机的执行策略设置的类似方法(可能通过其他方式而不是键)?
PS 当然,我可以在启动cmdlet
时手动输入此powershell_ise
,但我想创建单独的标签在我的桌面上,在我需要时使用此设置启动powershell_ise
。
答案 0 :(得分:1)
流程范围执行策略由PSExecutionPolicyPreference
环境变量控制。在启动PowerShell ISE之前,可以将此环境变量设置为所需的值。