VS Code Scripts Error: Cannot be loaded because running scripts is disabled on this system
VS Code Terminal displays this error
Cannot be loaded because running scripts is disabled on this system
If you want to continue using powershell as the terminal, you will need to tweak settings.json (ctrl shft p and search for settings). Add the following json code to this file.
{
“terminal.integrated.profiles.windows”: {
“PowerShell”: {
“source”: “PowerShell”,
“icon”: “terminal-powershell”,
“args”: [“-ExecutionPolicy”, “Bypass”]
}
},
“terminal.integrated.defaultProfile.windows”: “PowerShell”,
}
If you can make do with the windows cmd prompt, change the VS Code terminal from powerShell to cmd (cmd already has the privileges for running scripts).
- Terminal -> New Terminal –> “Default Shell” –> Windows
That’s it.
Leave a Reply