PowerShell is a powerful scripting language and automation tool that comes built-in with Windows operating systems. It allows users to automate tasks, manage system configurations, and interact with various services. However, when running PowerShell scripts, you may encounter the error “Running scripts is disabled on this system”. This error occurs due to PowerShell’s default execution policy, which is set to Restricted, preventing any scripts from being executed to enhance system security.
In this article, we will explore the different execution policies in PowerShell and guide you through the process of resolving this error to enable script execution.
Understanding PowerShell Execution Policies:
PowerShell features four primary execution policies that determine the conditions under which scripts can be executed:
- Restricted: This is the default policy and prevents running any scripts. You can still use PowerShell for individual commands but cannot execute scripts.
- AllSigned: This policy allows you to run scripts that have been digitally signed by a trusted publisher. Any unsigned scripts will not be executed.
- RemoteSigned: This policy enables you to run locally-created scripts, while scripts downloaded from the internet must be signed by a trusted publisher to execute.
- Unrestricted: This policy permits the execution of all scripts, regardless of their origin or whether they are signed. This setting may pose security risks, so use it with caution.
Error:
This error comes when the PowerShell execution policy doesn’t allow us to run scripts. I also found the same error when tried to run a PowerShell script.

Solution:
To resolve the “Running scripts is disabled on this system” error, you need to change the execution policy. Follow these steps:
- Launch PowerShell with administrative privileges: Click on the Start menu, type “PowerShell”, right-click on “Windows PowerShell,” and select “Run as administrator”.
- Check the current execution policy: To verify the current policy, run the following command:1Get-ExecutionPolicy
- Change the execution policy: To change the policy, use the `Set-ExecutionPolicy` cmdlet, followed by the desired policy. For example, to set the execution policy to RemoteSigned, run:1Set-ExecutionPolicy RemoteSigned
You will be prompted to confirm the change. Press “Y” and then Enter to confirm.
- Verify the new policy: Run `Get-ExecutionPolicy` again to ensure that the policy has been changed successfully.
- Close and reopen the PowerShell window to apply the changes.
Note: It is essential to understand the security implications of changing the execution policy. Be cautious when selecting a policy, as it may expose your system to potential risks. The RemoteSigned policy is a good balance between security and functionality for most users.
Conclusion:
In this article, we have explored PowerShell execution policies and provided a step-by-step guide on resolving the “Running scripts is disabled on this system” error. By changing the execution policy, you can enable the running of PowerShell scripts on your system while still maintaining an appropriate level of security. Remember to exercise caution when choosing an execution policy and always run scripts from trusted sources to protect your system from potential threats. With the error resolved, you can now harness the full power of PowerShell scripts to automate tasks and manage your system more efficiently.
18 Comments
Thanks a lot. It works for me..!
Thanks for the tutorial
I tried to write the command and the response was:
‘Set-ExecutionPolicy’ is not recognized as an internal or external command,
executable program or batch file.
Very good website my problem is solution
Thanks it worked
This fixed it for me on Windows 10 running in Parallels on a Macbook. Thanks for sharing this, a great help!
tnx dude it helps
Mine didn’t work. This is the error
Get-Process : A positional parameter cannot be found that accepts argument ‘Set-ExecutionPolicy’.
At line:1 char:1
+ PS C:\> Set-ExecutionPolicy RemoteSigned
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.GetProcessCommand
Run as admin; that should do it
same error with admin
You are using Get-Process ? May we see your full command?
All you should be entering is:
Set-ExecutionPolicy RemoteSigned
verry verrrrrrrrryyyyyyyyyyyyyyyyy helpful
thnaks
Thanks for your explanation about PS policy, It help me alot.
thanks it worked for me
how we can on window 10 plz tell me step by step
Hi,
please just notice that it need to be set separately for x86 and x64 versions of powershell.
Hi,RAHUL
Thank You So Much For PowerShell – Running scripts is disabled on this system. You Explanation is good.
will this script work on windows 7 ?
yes it will