Wednesday, 13 July 2022

VS Code - Run a Powershell Script with Shortcut Key


Preferences: Open Keyboard Shortcuts (JSON) via F1 or ctrl+shift+p (Not sure why but ctrl+shift+p doesn't work on my system, it's F1)

Add the following block to the file:

{
    "key": "f12", 
    "command": "workbench.action.terminal.sendSequence",
    "args": {"text": "powershell C:\\scripts\\UpdatePipelines.ps1\u000D"} 
},

VS Code - Run a Powershell Script with Shortcut Key

Preferences: Open Keyboard Shortcuts (JSON) via F1 or  ctrl+shift+p (Not sure why but ctrl+shift+p doesn't work on my system, it'...