- Get the current execution policy using the following command and remember it:
Get-ExecutionPolicy
- Set the execution policy to unrestricted using the following command:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
- Execute the unsigned script.
- Return the back execution policy to what it was (i.e. from step 1). Using the following command syntax similar to step 2:
Note: This is not required if you know that you are only running the script that you trust.
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy <EXECUTION_POLICY_FROM_STEP1>
Leave a Reply