Config Server Firewall

How to Set PowerShell Execution Policy in Windows 10

PowerShell execution policy is a security measure that determines whether scripts have permission to run on the Windows system. By default, the execution policy is set to "Restricted" in Windows 10/Server.

That means, you cannot execute scripts, but you can still execute individual commands in the PowerShell Window. If you create a script, and then try to run it, you will get an error message, similar to the following:

cannot be loaded because running scripts is disabled on this system.

To check the current PowerShell execution policy setting, you can use the following command:


We can change the execution policy setting using the Set-ExecutionPolicy command:

Set-ExecutionPolicy Bypass

In the preceding example, we change the execution policy to Bypass, which allows the script to run without any restriction.

The following are possible values for the execution policy in Windows PowerShell.

How to Set PowerShell Execution Policy in Windows 10