Windows Server

How to set the PowerShell Execution Policy via the registry settings

PowerShell is configured to prevent the execution of PowerShell scripts on Windows systems by default. In order to run commands, one of the following systems must be taken into consideration. See how this can be done with PowerShell.

To do this, open the Registry editor. 
– To change the execution policy for the current user, go to 

HKEY_CURRENT_USER\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell 

Set the string value ExecutionPolicy to one of the following values:
– Restricted
– AllSigned
– RemoteSigned
– Unrestricted,
– Undefined. 

To change the execution policy for the LocalMachine scope, Navigate to the path as shown below.

Currently, no value is set and none is currently available. To set the string value ExecutionPolicy to one of the following values: Create a new string and enter any ExecutionPolicy value you desire as below. Restricted, AllSigned, RemoteSigned, Unrestricted, Undefined. 

Create a new string and name it ExecutionPolicy
– Now enter the desired value.

Press okay afterwards and that is all 😉

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x