VSCode – Execution policies

Table of Contents


The issue is that PowerShell by default restricts running scripts unless we change the execution policies.

we can change the execution policies by adding -ExecutionPolicy Bypass args. in vscode you will have to create a shell profile with these args by adding below in settings.json (ctrl + shift + p and type “settings.json”).

  1. Ctrl + Shift + p and type “settings.json”
  2. Copy&Paste code
  3. Restart VSCode
					"": {
  "PowerShell": {
    "source": "PowerShell",
    "icon": "terminal-powershell",
    "args": ["-ExecutionPolicy", "Bypass"]
"": "PowerShell",

Note: terminal.integrated.shellArgs settings have been deprecated.

VSCode – open dir from cli

Table of Contents

OPEN VSCode from Terminal

					code    // Opens VSCode
code .  // Opens VSCode with actual opened directory
code -n // opens new VSCode Window