How to fix error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system, (without security risk)? How to fix error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system, (without security risk)? powershell powershell

How to fix error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system, (without security risk)?


I'd recommend using RemoteSigned as opposed to Unrestricted, and limiting the policy to the CurrentUser if possible.

Run Powershell as Admin, and then:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

RemoteSigned: "The default execution policy for Windows server computers."



Other than that, I wouldn't worry about it too much, as it's not intended to be a security mechanism. See this quote from the docs:

"The execution policy isn't a security system that restricts useractions. For example, users can easily bypass a policy by typing thescript contents at the command line when they cannot run a script.Instead, the execution policy helps users to set basic rules andprevents them from violating them unintentionally."


For those who are not aware of how to solve this error using Windows PowerShell

  1. Open PowerShell (Run As Administrator)
  2. Check the current execution policy using this command
    Get-ExecutionPolicy    # You should get 'Restricted'
  1. Run this command to make it 'Unrestricted'
    Set-ExecutionPolicy Unrestricted
  1. Check again whether execution policy changed by running this command
    Get-ExecutionPolicy    # You should get 'Unrestricted'
  1. Now try to run nodemon on your project
    nodemon 'filename.js'

Hope this would be helpful


There is no security risk whatsoever associated with allowing remoted signed scripts to run on your local machine. It basically means you can execute local unsigned scripts i.e scripts written by you while scripts from a remote source (nodemon in this case) must be signed by a trusted authority.

P.S: If you're on windows, you can just go to settings >> update and security >> for developers >> check the box beside change execution policy to allow local powershell scripts to run without signing