When you run a PowerShell script in the PowerShell terminal for the first time , sometimes you might get the below error.
File <Path>.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see
about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:) , ParentContainsErrorRecord
+ FullyQualifiedErrorId : UnauthorizedAccess
In order to fix this error , you need to enable or activate PowerShell on your system.
Follow the below steps to activate or enable the PowerShell on your system.
1. Run PowerShell terminal in administrator mode (Elevated mode).
2. Execute the following command
3. Type Y for Yes and press the enter key.
4. Now , you should able to run PowerShell scripts in the PowerShell terminal.
Enter your email address to subscribe to this blog and receive notifications of new posts by email.