XINSTALL BY CLICKING THE DOWNLOAD FILE
To fix various PC problems, we recommend DriverFix:This software will keep your drivers up and running, thus keeping you safe from common computer errors and hardware failure. Check all your drivers now in 3 easy steps:
- DriverFix has been downloaded by 0 readers this month.
PowerShell is a great tool for Windows system administration created by Microsoft. You can run command lines to automate the operating system.
This is a new tool that comes with Windows 10 and has many functionalities. However, these features come with several issues.
Many users encountered the error message “running of scripts is disabled on this system”.
Therefore, the PowerShell execution policy doesn’t allow running scripts. Also, the same error appears when trying to run a PowerShell script.
This is a major issue that makes the PowerShell unusable. Fortunately, there are some solutions available and today we will show you what to do if you encounter the “running of scripts is disabled on this system” error in PowerShell.
Can’t run scripts in PowerShell? Here’s the fix
Change the PowerShell execution policy
By default, the PowerShell execution policy is set to Restricted. You can change that by setting policy to RemoteSigned.
So, change the execution policies with Set-ExecutionPolicy cmdlet. It should be like this:
PS C:> Set-ExecutionPolicy RemoteSigned
Also, you can use the following command:
PS C:> get-executionpolicy
You can bypass the command above by adding this script:
c:> powershell -ExecutionPolicy ByPass -File script.ps1
Learn everything there is to know about PowerShell from our comprehensive guide!
Conclusion
As you can see, by typing some commands you can fix the “running of scripts is disabled on this system” error in PowerShell.
It is worth mentioning that PowerShell has four different execution policies:
Restricted – you can’t run scripts.
AllSigned – you can run only the scripts signed by a trusted publisher.
RemoteSigned – you can run downloaded scripts that a trusted publisher signed.
Unrestricted – you can run all Windows PowerShell scripts.
Also, keep in mind that PowerShell has the Restricted execution policy set as default. The reason is to stop people from executing commands found on the Internet. As we all know, some scripts can damage your computer.
So, before you change the execution policy, check your script and search for additional information about it. This way, you will make sure everything is safe before running the command in PowerShell.
Did our solution help you? What scripts do you run in PowerShell? Do let us know in the comments section below!
RELATED ARTICLES YOU NEED TO CHECK OUT:
ncG1vNJzZmivmaOxsMPSq5ypp6Kpe6S7zGinqK%2BVp8CpsculZJ6wlZjCtbXOp2Ssm6KevbW%2FjJ2grJmSobKlew%3D%3D