1

I'm fairly new to VS Code and I have been trying to setup the program/workspace (one and the same for me).

I've setup all the recommended settings for PowerShell, but I have been trying to change the integrated terminal to v7 - each time it loads is with V5.1.

Firstly, I know there are many answers out there - I have tried them all. The problem is that most of them are out of date now.

I ran into an answer by Ger83 in How to Change Visual Studio Code 'Powershell Integrated Console'?. There, he describes the deprecated features and issues with the PowerShell Extension. (Since Ger83 had the answers, I was going to leave comments - not enough reputation - or send a private message - does not exist - so I had to create a whole new question to get an answer.)

So, is there a way to change the PowerShell integrated console from v5.1 to v7 while also using the PowerShell Extension?

My settings.json, I believe, are setup correctly:

"terminal.integrated.defaultProfile.windows": "PowerShell",
"terminal.integrated.profiles.windows": {
    "PowerShell": {
        "source": "PowerShell",
        "icon": "terminal-powershell"

I tried to turn off the PowerShell extension, but as a result, I lost the ability to run PowerShell scripts from the editor.

With the extension on, I noticed that the language in the bottom-right corner is shown as v5.1. I don't know if it is possible to change this. PowerShell Language screenshot showing v5.1

If there is no way to change the integrated console to v7, are there any workarounds to enable easy running of a script directly to the PowerShellv7 console? This may be a shortcut or setting.

Edit: Answer is provided by mklement0 in the comments.

  • This is not really a PowerShell code question, but one about 'how do I set up VSCode to use PowerShell'. What recommended settings doc did you use? All you'd ever want to know about setting up VSC terminal (including the default ones) is in the [VSCode documentation settings](https://vscode.trafficmanager.net/docs/terminal/basics). By default if you'd install PSCore before VSC, VSC on install would know that and set things appropriately. So, try uninstall and reinstall in the suggested order. – postanote Jul 21 '22 at 03:37
  • Things indeed have changed recently with respect to the PIC (PowerShell Integrated Console), which your JSON settings do _not_ apply to. I've updated the bottom section of [this answer](https://stackoverflow.com/a/60555493/45375). You can comment here if that doesn't work for you. – mklement0 Jul 21 '22 at 18:57
  • 1
    Thank you, @mklement0, that is exactly the answer I have been looking for. It covers all the questions that I was trying to understand. – PainfulTruth Jul 25 '22 at 01:11

0 Answers0