-
Using "Developer PowerShell for VS 2022" inside VSCodeComputer/Software 2025. 6. 23. 22:24
When I searched Google using the keyword "VSCode Developer PowerShell terminal," I found various methods on Stack Overflow and Reddit. However, I discovered that most of these approaches do not work on Windows 11 with Visual Studio 2022. So, I tried setting up Developer PowerShell for VS 2022 directly in VS Code myself, and I was able to get it working as follows.
On my computer, I found that the shortcut for Developer PowerShell for VS 2022 uses the following command:
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -noe -c "&{Import-Module """C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"""; Enter-VsDevShell 30c73158}"
To integrate this into VS Code, follow these steps:
- Press Ctrl + , to open Settings.
- Search for "terminal.integrated.profiles" and locate the terminal.integrated.profiles.windows section in your settings.json file.
- Add the following profile configuration:
"terminal.integrated.profiles.windows": { "Developer PowerShell for VS 2022 (x64)": { "path":"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "icon": "terminal-powershell", "args": [ "-NoExit", "-Command", "Import-Module 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll'; Enter-VsDevShell 30c73158", ] },
Then, we can open "Developer PowerShell for VS 2022 (x64)" inside VSCode.