Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to Change the Windows Power Shell Execution Policy  (Read 2738 times)

0 Members and 1 Guest are viewing this topic.

mohitht

  • Guest
How to Change the Windows Power Shell Execution Policy
« on: January 03, 2014, 07:33:59 pm »
Hi All,

Usually in an Active Directory environment,the  executions of scripts especially power shell scripts can be controlled using group policy.

For a normal user the  execution policy will be Restricted by default, for security reasons. This can be changed by changing the values in registry as follows

In Restricted : Can’t run any scripts
In All Signed / Remote Signed : either self signed or trusted certificate required
In Unrestricted: no restriction in running any scripts.

Just copy paste the below lines in a text file and save it as extension ".reg"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]
“Path”=”C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe”
“ExecutionPolicy”=”RemoteSigned”

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]“Path”=”C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe”"ExecutionPolicy”=”RemoteSigned”





Thanks  :)


Regards,
Mohith