There can always be scenarios in which Powershell is used to run unsigned (e.g. self-written) scripts. By default, running scripts on your own system is not allowed, as it poses potential security risks.
The behavior can be enforced with just a few lines of input and can also be reversed again.
There can be 5 return values as an answer
While "Bypass" is often only used temporarily, "Unrestricted" represents a more permanent solution to run.
To e.g. To be able to run scripts without digital signatures, enter the following line in Powershell
If you no longer need scripts, you should reset the execution policies so that no more scripts can be executed.
To do this, enter the command
This stops scripts from running again.
The behavior can be enforced with just a few lines of input and can also be reversed again.
- Open the powershell icon via the Windows start menu with admin rights (right click "open as administrator")
- First check the currently assigned rights by entering the following command
Get-ExecutionPolicy
There can be 5 return values as an answer
- AllSigned: All scripts, both local and downloaded, must be digitally signed to run.
- Bypass: Scripts are executed without restrictions. This is the least restrictive execution policy.
- RemoteSigned: Local scripts can run without a digital signature, but downloaded scripts must be signed.
- Restricted: Script execution is NOT allowed. This is the most restrictive execution policy and the default policy.
- Unrestricted: All scripts can be run without restrictions.
While "Bypass" is often only used temporarily, "Unrestricted" represents a more permanent solution to run.
To e.g. To be able to run scripts without digital signatures, enter the following line in Powershell
Set-ExecutionPolicy RemoteSigned
If you no longer need scripts, you should reset the execution policies so that no more scripts can be executed.
To do this, enter the command
Set-ExecutionPolicy Restricted
This stops scripts from running again.