This is a Powershell security policy to prevent scripts malicious to be improperly executed on your system. Therefore, all scripts which are not signed will have their execution blocked. That is, the execution policy is as Restricted
(which is the standard).
You can control these permissions using the cmdlet Set-ExecutionPolicy
. And you can check the current execution policy using the cmdlet Get-ExecutionPolicy
.
PS C:\Users\LINQ> Get-ExecutionPolicy
Restricted
PS C:\Users\LINQ> Set-ExecutionPolicy RemoteSigned
PS C:\Users\LINQ> Get-ExecutionPolicy
RemoteSigned
There are several types of permission you can use with this cmdlet
Restricted
Does not load or execute configuration files and/or scripts powershell.
Allsigned
Only executes scripts and configuration files signed by a trusted vendor, even if the script has been written by yourself (local).
Remotesigned
It is basically the same as the above, but allows the execution of configuration files and/or scripts local.
Unrestricted
Loads and executes all configuration files and scripts Powershell. A confirmation can be requested to run scripts unsigned.
Bypass
There is no restriction.
Undefined
Removes the current execution policy. Unless it is defined in a group directive.
Constructive criticism: What "bypass" does?
– Wallace Maxters