I recently rebuild my PC and was trying to run a powershell script for the first time on the PC. I got the error below
File C:\Support Tools\myscript.ps1 cannot be loaded because the executi
sabled on this system. Please see “get-help about_signing” for more details.
At line:1 char:17
+ .\xxxxxx.ps1 <<<< .\yyyyy.txt + CategoryInfo : NotSpecified: (:) , PSSecurityException + FullyQualifiedErrorId : RuntimeException This post describe the step-by-step process on How to enable execution of Powershell scripts
When you start Windows PowerShell on a computer for the first time, the Restricted execution policy (the default) is likely to be in effect. This restricted policy does not permit ay scripts to run.
To permit unsigned powershell scripts to run from your local computer you will need to change the executionpolicy
Start Windows PowerShell on the computer with account that have administrative priveldge or “Run as Administrator” option.
At the command prompt Enter
Only members of the Administrators group on the computer can change the execution policy.
You can now run your powershell scripts without any error again.
Latest posts by Emmanuel (see all)
- How to Enable Failed Tracking Request in IIS7.0/8.5 - February 18, 2016
- Switching from Local account to Microsoft account in Windows 10. - October 26, 2015
- How to export a certificate with the private key - October 8, 2015