.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




Popular posts from this blog

How to Create Host Header to SharePoint Web Application

System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission - User Profile Issue

How to add PDF Icon in SharePoint