I have a small project that depends on Windows PowerShell (5.1).
MyReport/
├── .vscode
│ └── settings.json
├── Classes.ps1
├── Get-Report.ps1
└── config.jsonc
When I open the folder MyReport, it always starts PowerShell 7 in the integrated terminal.
My .vscode/settings.json
looks like this:
{
"powershell.powerShellDefaultVersion": "Windows PowerShell",
"terminal.integrated.defaultProfile.windows": "Windows PowerShell",
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
}
What do I have to change, to make Windows PowerShell (5.1) the integrated terminal?
I'm using VSCode version 1.66.
CodePudding user response:
Try the following:
On the terminal ribbon you can find an arrow (next to the sign).
Select configure terminal setting
.
Look for:
Terminal › External: Windows Exec
Customizes which terminal to run on Windows.
Type:
C:\Windows\System32\powershell.exe
Disclaimer: not tested
CodePudding user response:
Within vs-code, in the terminal window, click the dropdown icon right next to the " " (plus) icon.
Find the option "Select Default Profile", another dropdown should appear from the top of the application window.
Find the powershell correct reference, i use 'pwsh.exe' located in my powershell version 7 folder