Answer: In PowerShell 2.0 we have the option to control what type of scripts we can run by applying a script execution policy.
In PowerShell 2.0 we have three types of Execution Policy and they are:
- Allsigned
All scripts needs to have a trusted signature
- Remotesigned
All scripts downloaded from the internet needs to have trusted signature
- Unrestricted
Runs any script regardless if it’s signed or not
To check the current Execution Policy applied to your computer \ server run the following cmdlet:
Get-executionpolicy
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2010/08/082010_0357_QuestionHow1.png)
To set the policy type:
Set-executionpolicy unrestricted
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2010/08/082010_0357_QuestionHow2.png)