In this article, we will discuss the reason due to which this error might be triggered and some viable solutions to fix it permanently. Make sure to follow the steps carefully and accurately to avoid conflict.
What Causes the “Running Scripts is Disabled on this System” Error?
After receiving numerous reports from multiple users, we decided to look into the matter and our research suggests that the error is caused due to the following problem. Now that you have a basic understanding of the nature of the problem, we will move on towards the solutions.
Solution 1: Adding Code
If you want to run a particular script on your computer without going through the hassle of changing the execution policy, you can always add a piece of code to the command which will grant the script access through the policy. For that:
Solution 2: Changing the Execution Policy
Since the execution policy provides access to the Powershell to run a particular script, if it is set to restricted, it will block all scripts from being executed. There are different modes that you can set the policy to depending upon your situation. Those modes are: Now that you know the levels to which the execution policy can be set to, you can easily choose the best one for you depending upon your requirements. In order to change the execution policy:
Fix: Execution of scripts is disabled on this systemBatch Scripts on Windows 10: Making Life EasierHow to use Linux scripts to Tidy up Your Desktop in Windows 10How to Use the xmessage App Inside of Shell Scripts