How to set the PowerShell execution policy

What is the PowerShell execution policy

The PowerShell execution policy controls what types of PowerShell scripts are allowed to be executed on your system. It can either be controlled by local settings or by group policies

What type of policy is currently set on my system

There is a separate execution policy for x64 and x86 PowerShell console

  • Open a PowerShell console
  • Type the command Get-ExecutionPolicy
  • Read the return value in the console and look it up in the PowerShell documentation

How to set the policy

You can set the execution policy with the Set-ExecutionPolicy Cmdlet. If you are unsure what to use you should ask your IT-department. A good compromise of security and usability is RemoteSigned, which is the Windows default.

  • Press Win
  • Type Powershell
  • Rightclick Windows PowerShell
  • Click Run as administrator
  • In the PowerShell console enter the command 
Set-ExecutionPolicy RemoteSigned

Group Policy

Some IT-Departments might have set the execution policy via group policies to AllSigned or Restricted. This will prevent you from setting it manually and you will need to ask them how to proceed. 

See also