To change the PowerShell Execution Policy you can execute the following from within the PowerShell command window:
Or you can change the Execution Policy via the registry by navigating to the following:
Then locate string value ExecutionPolicy and add the value from the list below:
For example if you want to set your PowerShell execution policy for RemoteSigned add the following: HKLM\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell "ExecutionPolicy"="RemoteSigned"
Here you will find a list of the available PowerShell execution policies with a brief description of each:
All scripts as well as configuration files must be signed by a trusted publisher. This includes script on the local as well as remote machines.
Uses the default Restricted policy.
All scripts as well as configuration files downloaded via the Internet must be signed by a trusted publisher.
As mentioned this is the PowerShell default and will not allow you to execute scripts or load configuration files. This allows you to execute all scripts as well as load configuration files however if you download a script from the internet you are prompted to approve it before it can execute.