To check the current status of execution policies on your machine, run the following command in a powershell terminal:
Get-Execution Policy
To set the execution policy on your machine to unrestricted run the following command in a powershell terminal:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
If you just want to run a script one time but don’t want to set the policy as unrestricted. You can also open an instance of powershell that will bypass execution policies by doing the below:
- Open a CMD prompt
- Type the following command:
powershell -ep bypass
- This will launch a powershell session within the command prompt window
