-
Notifications
You must be signed in to change notification settings - Fork 237
Closed
Labels
Issue-BugA bug to squash.A bug to squash.
Milestone
Description
Copied from vscode-powershell issue: PowerShell/vscode-powershell#119
Details from @ftischhauser:
When setting the execution policy to 'Bypass' using the machine policy, the PS host fails to start with the following error:
Unhandled Exception: System.Management.Automation.CmdletInvocationException: Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of Bypass
To reproduce the issue you can set the following registry values:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell]
"EnableScripts"=dword:00000001
"ExecutionPolicy"="Bypass"
As this is the least restrictive setting the host should work just fine and catch this error.
Thanks for looking into this!
Metadata
Metadata
Assignees
Labels
Issue-BugA bug to squash.A bug to squash.