Home » Solved: “running scripts is disabled on this system” in PowerShell

# Solved: “running scripts is disabled on this system” in PowerShell

Since I intensively started using Visual Studio Code across my devices, with PowerShell as my main terminal, I started running into the following error quite a lot:

What’s happening here, is that your computer is preventing you from running potentially harmful scripts. This safety mechanism can broadly be configured on three levels: for your computer, for a user or for a particular session. These safety mechanisms are execution policies.

It’s good to know that you can bypass this safety mechanism by copying the code from a script and running it manually in a PowerShell terminal. So execution policies do not block the code, but they make sure you don’t unintentionally run malicious scripts.

However, there’s a more conventional way. You can relax the execution policies, by taking these simple steps.

1. Press the windows-button on your keyboard.
2. Type ‘PowerShell’
3. Right-click Windows PowerShell
5. Run the following command and confirm with ‘Y’
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine

We have changed the execution policies to allow local and remote signed scripts and we have done this for the scope of your machine. Conclusion: You can now run PowerShell scripts on your computer.

Great success!

### Say thanks, ask questions or give feedback

Technologies get updated, syntax changes and honestly… I make mistakes too. If something is incorrect, incomplete or doesn’t work, let me know in the comments below and help thousands of visitors.

## 44 thoughts on “Solved: “running scripts is disabled on this system” in PowerShell”

1. Thank’s a lot!!!!

2. thanks man!

3. try this:

cmd
C:\> powershell -executionpolicy bypass
PS C:\>

or just add -executionpolicy bypass to your powershell shortcut

1. Thanks, Leptoid!

2. thank u it helps me

4. Same problem I too faced when load vue instance. Your suggestion mentioned above solved it….,
Thanks a lot.

1. Hi Suresh
Roel

5. Same problem I too faced when try to load vue instance. Your suggestion mentioned above solved it….,
Thanks a lot.

1. You’re welcome!

6. thanks a lot bro it worked 🙂

7. Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Worked for me

8. This helps me from a long weekend getting ruined by the execution policy;

9. Sweet, thank you very much for sharing the solution.

10. Awesome dude <3

11. Thanks bro.

12. thanks a lot.

13. Thanks alot

14. Thanks a lot man it really helped me…

15. Thanks so much!

16. Waaahh…! A greater problem with one line solution. thank you man!

17. Thank you my problem got solved

18. thanks a lot

19. Thanks a lot! that’s great!!!