Configuring PowerShell Execution Policies

The PowerShell Execution Policies are like most things in PowerShell Cmdlets. The Get-ExecutionPolicy cmdlet allows for you to set four different execution policies.

 

Execution policies are no more than a set of rules that governs how your PowerShell scripts execute on your machine.

 

To see what policy you are currently using for PowerShell execute the following from the PowerShell command window:

 

Get-ExecutionPolicy

 

The four PowerShell execution policies include the following:

 

Restricted: No scripts can run.

 

AllSigned: Ps1 and .Ps1xml files must be digitally signed.

 

RemoteSigned: Ps1 and .Ps1xml files from the internet must be digitally signed.

 

Unrestricted: No digital signatures are required and all scripts can be executed.

 

To change your Execution Policy you can run the Set-ExecutionPolicy cmdlet from the PowerShell command window and specify the execution policy that you want enabled as in the following examples below:

 

Set-ExecutionPolicy Restricted

 

Set-ExecutionPolicy AllSigned

 

Set-ExecutionPolicy Unrestricted

 

Set-ExecutionPolicy RemoteSigned

 

Published Friday, September 08, 2006 7:36 PM by dhite
Filed under:

Comments

No Comments