inline Chocolatey installer fails in PowerShell

The chocolatey installer might fail when run in PowerShell, saying something like

[File] cannot be loaded. The script will not execute on the system. See about_Execution_Policies

This is caused by the execution-policy of the shell. To allow the installer to work for this session only, the following command can be used:

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process

This will allow the installer to execute properly. When the shell is closed, everything is reset to normal. Subsequent installs of software from the chocolatey repositories does not need the policy set.

Comments

comments powered by Disqus