Command Prompt/PowerShell Closing Automatically with Error -532462766/-1 in Visual Studio Code

24 Views Asked by At

Description: I am encountering an issue with both Command Prompt and PowerShell in Visual Studio Code. Whenever I attempt to open either the Command Prompt or PowerShell terminal within Visual Studio Code, the terminal window closes automatically after a few seconds, and I receive an error message.

For PowerShell, the error message reads: "The terminal process 'C:\Program Files\PowerShell\7\pwsh.exe' terminated with exit code: -532462766."

And for Command Prompt, the error message is: "The terminal process 'C:\WINDOWS\System32\cmd.exe' terminated with exit code: -1."

This problem persists regardless of whether I access the terminal through Visual Studio Code or open it separately. I have tried restarting Visual Studio Code, reinstalling both Visual Studio Code and PowerShell, and ensuring that all software is up to date, but the issue remains unresolved.

Any insights or suggestions on how to troubleshoot and resolve this issue would be greatly appreciated. Thank you!

I have tried restarting Visual Studio Code, reinstalling both Visual Studio Code and PowerShell, and ensuring that all software is up to date, but the issue remains unresolved.

0

There are 0 best solutions below