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!!!
- Open Registry Editor.
- Go to
- Change the registry key
- 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.
Please refer to Microsoft document if you want to learn more about PowerShell execution policy.