VS code error scripts Archives - For all your terraform needs https://terraformarchitect.com/tag/vs-code-error-scripts/ Automation cannot be an afterthought (TM) Thu, 03 Nov 2022 14:59:31 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 VS Code Scripts Error: Cannot be loaded because running scripts is disabled on this system https://terraformarchitect.com/known-issues-terraform/vs-code-scripts-error-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system/?utm_source=rss&utm_medium=rss&utm_campaign=vs-code-scripts-error-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system https://terraformarchitect.com/known-issues-terraform/vs-code-scripts-error-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system/#respond Thu, 03 Nov 2022 14:59:31 +0000 https://terraformarchitect.com/?p=293 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 […]

The post VS Code Scripts Error: Cannot be loaded because running scripts is disabled on this system appeared first on For all your terraform needs.

]]>
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).
  1. Terminal -> New Terminal –> “Default Shell” –> Windows

That’s it.

 

The post VS Code Scripts Error: Cannot be loaded because running scripts is disabled on this system appeared first on For all your terraform needs.

]]>
https://terraformarchitect.com/known-issues-terraform/vs-code-scripts-error-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system/feed/ 0