[Solved] VS Code cordova.ps1 cannot be loaded because running scripts is disabled on this system

When I am going to run cordova commands in VS code terminal coming this error.

PS F:\Games\folder\subfolder> cordova
cordova : File C:\Users\XXXX\AppData\Roaming\npm\cordova.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.
+ cordova clean
+ ~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
VS Code cordova.ps1 cannot be loaded because running scripts is disabled on this system
VS Code cordova.ps1 cannot be loaded because running scripts is disabled on this system

Error Type 1

If your error is like this,

PS F:\Games\folder\subfolder> cordova
cordova : File C:\Users\XXXX\AppData\Roaming\npm\cordova.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.
+ cordova clean
+ ~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Open windows command shell as administrator and run command:

Set-ExecutionPolicy Unrestricted
VS Code Cordova.ps1 Cannot Be Loaded Because Running Scripts Is Disabled On This System
VS Code Cordova.ps1 Cannot Be Loaded Because Running Scripts Is Disabled On This System

Error Type 2

If your error is like this,

artillery annot be loaded because running scripts is disabled on this system

Open windows command shell as administrator and run command:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

If you still have any error please comment bellow.

You always welcome to our support center.

You can ask any question in our community.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top