Cannot open a Terminal session
I'm receiving the error mentioned in other threads -- PLUS the fact I cannot open a terminal. I uninstalled VSCode completely, rebooted, reinstalled and before installing any PowerShell extensions, tried to open a terminal and it failed with the error:
The terminal process command 'C:\Program Files\PowerShell\7\pwsh.exe' failed to launch (exit code: {2})
@SlkRck could you please specify the other issue you are referring to...from the looks of the error it seems that PowerShell isnt properly getting picked up on your system...could you please also specify your system information ie. any VSCode settings, what OS you are using, and what versions of PowerShell are installed on your system? Thanks!
I have two issues:
- No ability to open a new Terminal. It closes with the error message:The terminal process command 'C:\Program Files\PowerShell\7\pwsh.exe' failed to launch (exit code: {2})
- When attempting to install the PowerShell extension I received the error: Language Server startup failed.
The VSCode settings are all default. I am using Windows 10.0.19041. I have PowerShell version 7.0.0
Thanks @SlkRck could you please try re-producing this issue with Windows PowerShell set as your default powershell version so we can determine if this is isolated to PowerShell 7...to do this open your VSCode settings file and add " "powershell.powerShellDefaultVersion": "Windows PowerShell (x64)",
Here is what the setting file looks like
I still receive the error: The terminal process command 'C:\Program Files\PowerShell\7\pwsh.exe' failed to launch (exit code: {2})
Oh you said before you installed any PowerShell extensions, you received this error.
Do you remember how you installed PowerShell 7? Was it through the MSI?
Also, does PowerShell 7 launch normally outside of VS Code?
This issue should go into Microsoft/vscode instead, but we can keep it here for now until we get more info.
cc @Tyriar
OK...maybe I wasnt clear:
Everything worked BEFORE I installed PowerShell 7. I uninstalled everything after it stopped working and tried reinstalling piece by piece.
PowerShell 7 works perfectly outside of VS Code. I installed PowerShell 7 using the MSI.
@SlkRck thanks for all the info, one more thing that would be helpful for you to try, are you able to open PowerShell 7 as your terminal in VSCode (not the integrated terminal):

Do you have anti-virus installed that could be blocking the terminal? https://code.visualstudio.com/docs/editor/integrated-terminal#_how-do-i-fix-the-errors-connectnamedpipe-failed-windows-error-232-or-terminal-exited-with-code-x-on-windows
This issue is being closed as inactive, if this issue is still occurring it will be re-opened