.ps1 cannot be loaded because running scripts is disabled on this system

Many of us has face this error When we are trying to execute PowerShell Script on our Windows PC/Server.

Solution is to enable the PowerShell Scripts on the PC. How to do that ?

First we need to see what is the current script execution policy, by using Get-Execution Policy Command

Get-ExecutionPolicy -List

Now we know what is the current policy of our PC. Now it’s time to enable the Policy for us to execute the Scripts.

Set-ExecutionPolicy -Scope LocalMachine Unrestricted

Now We can check our current policy Status with previous Get-Execution Policy Command

Get-ExecutionPolicy -List

Leave a Reply

Your email address will not be published. Required fields are marked *