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

33 views Asked by At

PS C:\projects\Node Series\2-ExpressServer> touch index2.js touch : File C:\Program Files\nodejs\touch.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. LinkID=135170. At line:1 char:1

  • touch index2.js
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess
    
1

There are 1 answers

1
SYED IRTAZA HASNAIN On

In Vs Code change the terminal from powershell to cmd prompt, the issue will be resolved. enter image description here