0

For some reason my default process security policy is RemoteSigned. This interferes with using an venv with PyCharm. The following is the only thing I've found online and doesn't change the default. It only changes it inside that PowerShell instance.

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted -Force

I want the default to be Unrestricted. Running PyCharm as admin does not help. I'm also on Windows 11.

Luiz
  • 311
  • 1
  • 3
  • 13
  • Your process ends when it ends, meaning if you want to change the default when you start a new process, you will need to set this in a higher scope. – iRon May 30 '23 at 06:49

1 Answers1

0

If you want to set the scope for all processes and users to unrestricted, than you have to run

Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted

The -Scope Process only changes the settings for the current powershell session.

Microsoft documentation for Powershell 7

marsh-wiggle
  • 2,508
  • 3
  • 35
  • 52