Error:
ng : File C:\Program Files\nodejs\ng.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ ng version
+ ~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException

solution
To fix this issue, you need to open PowerShell as an administrator.
Right-click on the PowerShell icon and select “Run as Administrator” from the context menu. Alternatively,
you can press the Windows key, type “powershell”, right-click on “Windows PowerShell” in the search results,
and select “Run as Administrator”.
After opening PowerShell as an administrator, run the “Set-ExecutionPolicy RemoteSigned” command again to set the execution policy. This should allow you to execute the ng command without any issues.

I’m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I’ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains:
-
DevOps School – Tech blogs and tutorials
-
Holiday Landmark – Travel stories and guides
-
Stocks Mantra – Stock market strategies and tips
-
My Medic Plus – Health and fitness guidance
-
TrueReviewNow – Honest product reviews
-
Wizbrand – SEO and digital tools for businesses
I’m also exploring the fascinating world of Quantum Computing.
[…] Error:File C:Program Filesnodejsng.ps1 cannot be loaded […]