I am trying to replace the default Powershell 5 with the newer Powershell 7, on Windows 11.
99% of the solutions on the internet say to add this to settings.json
.
"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\7\\pwsh.exe"
However, this now gives a red squiggly line with the following message:
This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in
#terminal.integrated.profiles.windows#
and setting its profile name as the default in#terminal.integrated.defaultProfile.windows#
. This will currently take priority over the new profiles settings but that will change in the future.(2)
There is one possibly related thread, but it only deals with defaulting it to the native Command Prompt
, rather than re-jigging things to Powershell 7
.
So, what is the correct new way to provide Powershell 7
s path to VS Code, and also set it as the default terminal?