Using Visual Studio Developer prompt with PowerShell/PWSH
2 min readNov 15, 2021
TL:DR
So you are probably thinking, wait a second, I can see that in my shortcuts, there is a PowerShell Command. And am using that, so why does your article need to even exist?
So why use this instead?
- Use PowerShell Core/7+ while shortcut uses Windows PowerShell 5.0 instead
- Use with your own custom PowerShell script which a shortcut won’t support
- Add to your own PowerShell profile which the existing shortcut cannot support
- Use x64 prompt instead of 32 bit prompts by default which the old shortcut does not support
At the end, the reasons are endless and all can be said are down to making your current workflow a lot more efficient.
Let’s do it
Default Installation directory
- VS 2019 this would be ${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\Community
- For VS 2022 this would be $env:ProgramFiles\Microsoft Visual Studio\2022\Community for Visual Studio 2022 (Holy 64 bits Batman!).
Of course Community probably gets replaced by Enterprise in your case or Professional if you have licenses for those
Modifying PowerShell scripts
- Modify your PowerShell profile
- You can modify any PowerShell scripts.
Maybe a ps1 script which opens a new custom profile in Windows Terminal or Windows shortcuts if that’s what you are into
Script to add
For default
Use x64 instead
You would need to use the DevCmdArguments command instead with arch as x64
Disable default logo
You would have to use the -no_logo command in DevCmdArguments.
Special thanks to