Quick Note: Modify PowerShell Execution Policy in Registry

I think to maintain a solid security policy is mandatory in an enterprise network. The information leak not only a threat to IT but also impact the firm’s profits and stock performance. Firms usually leverage Active Directory Group Policy to control security settings on Windows. The PowerShell execution policy is the one most company ITs would restrict.

IT Pros may need to do some testing in scripting. I have posted how to change PowerShell execution policy by PowerShell command.

Following is the step of how to get rid of the restriction. This is just for temporary use. You should revert it immediately after testing!!!

  1. Open Registry Editor.
  1. Go to HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell.
  2. Change the registry key ExecutionPolicy value to RemoteSigned.
  3. Open a new PowerShell prompt and run your script.

If you don’t want to change the registry key. You can paste the scripts into Windows PowerShell ISE and run all of the lines. Please note this option may throw error if you have relative paths in the script due to the temp script running under the same directory of Windows PowerShell ISE application.

How to run selection in Windows PowerShell ISE
How to run selection in Windows PowerShell ISE

Please refer to Microsoft document if you want to learn more about PowerShell execution policy.