Question:How To Set Execution Policy In PowerShell 2.0

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:

  1. Allsigned

All scripts needs to have a trusted signature

  1. Remotesigned

All scripts downloaded from the internet needs to have trusted signature

  1. 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

To set the policy type:

Set-executionpolicy unrestricted


Posted

in

by