Sometimes Windows policies block the execution of PS1 scripts, such as for portable VSCode or Python plugins. To adjust the policy, use the following commands in an administrator terminal. First, query the current policy. Then, use the command to set the policy. After setting, query again to verify the change.
Error Running a .ps1 Script
Sometimes Windows policy blocks .ps1 scripts from running, for example with my portable VSCode or Python extension.
Use the following command in an administrator terminal to adjust the policy.
Check the policy
The result will look something like this:
Use the following command to set the policy
Check again, and the result will look something like this: