PowerShell: It is forbidden to run scripts or powershell scripts on this system.
When installing chocolatey (official website), you cannot run the chocolateyInstall. pal script file.
After reading the information, the following solutions are obtained:
When Windows PowerShell is started on the computer for the first time, the current execution policy may be Restricted (default setting ).
Restricted execution policy does not allow any scripts to run.
AllSigned and RemoteSigned execute policies to prevent Windows PowerShell from running scripts without digital signatures.
This topic describes how to run the selected unsigned script, even if the execution policy is RemoteSigned.
The script is signed for your own use.
For more information about Windows PowerShell execution policies, see about_Execution_Policy.
To understand the current execution policy on the computer, type:
Get-executionpolicy
To run your unsigned scripts and signature scripts from other users on your local computer, run the following command
Execute the policy to RemoteSigned:
Set-executionpolicy remotesigned
For more information, see Set-ExecutionPolicy.