How to set permissions to run PowerShell Scripts?

Microsoft Windows PowerShell command line shell and scripting language helps IT professionals achieve greater control and productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation.

By default, Powershell comes with the most secure policy i.e. Restricted. It permits users to execute commands in the shell, but does not permit scripts to run. Click here for more details about execution policies. Here is how you set the policy to execute Powershell scripts

You can change the PowerShell execution policy on your computer. The change is effective immediately and is retained until you change it again. Only Administrators are permitted to change the policy.

To change your execution policy, type:

Set-ExecutionPolicy

In our case, it'll be:

Set-ExecutionPolicy RemoteSigned

If the command is successful, PowerShell displays the command prompt. There is no success message. If the command fails, PowerShell displays an error message, and reverts to the previous execution policy.

To see the PowerShell execution policy, type:

Get-ExecutionPolicy

If the command is not successful, you might have misspelled the policy name. Check the name and try again. If you do not have permission to run this command, see your system administrator.

Did this tutorial help a little? How about buy me a cup of coffee?

Buy me a coffee at ko-fi.com

Please feel free to use the comments form below if you have any questions or need more explanation on anything. I recommend thoroughy testing on a production-like test system first before moving to production.