How to configure a VSCode Task to run a PowerShell script in the integrated terminal
Run Code on integrated terminal Visual Studio Code
Integrated Terminal Tasks
Features In order to use this application, create a configuration file
in your .vscode directory. This file will define the available tasks.
For example, it could look something like:
{
"Task Name": {
"cmd": "ps", // The command you'd like to run in the terminal
"args": ["-a"], // Array of string arguments to the command
"stealFocus": true, // If this is true, focus will jump to the terminal right away
"shellOptions": {} // This allows you to override the default shell options described below for this specific task.
},
"Task 2:" {
"cmd": { // cmd and args can also vary based on platform, just like default shell.
"default": "vi",
"mac": "nano",
"linux": "emacs"
},
"args": {
"default": []
"mac": ["-B"]
}
}
}
How do I configure a task to call a PowerShell script