Currently running VS 2022 with Developer Powershell terminal v17.3.0-pre.2.0.
If I run the powershell command $PSVersionTable.PSVersion it tells me the terminal is running PS v5, but I woudl really like to utilise v7
I've had a look at this doc which suggest the Architecture can be possible changed, but there is no reference about PS version. A search online has not yielded any answers.
Can PS v7 run in Developer Powershell ?
Use the Terminal Options dialog to change the "Developer PowerShell" Shell Location to your desired version.
The article you linked implies that "Developer" PowerShell is just regular PowerShell with extra command-line arguments. If so then it appears that we can use the Terminal Options dialog to change the location of the PowerShell exe while maintaining the arguments.
I installed PowerShell 7.3, so the Shell Location that works for me is: C:\Program Files\PowerShell\7\pwsh.exe

Warning: This gets PowerShell 7+ loading in Visual Studio, but things have changed in PS 7, so there may be more to do to fix the PowerShell configuration before all your modules work. If so then this link should help: https://learn.microsoft.com/en-us/powershell/scripting/whats-new/migrating-from-windows-powershell-51-to-powershell-7?view=powershell-7.3#powershell-7-compatibility-with-windows-powershell-51-modules
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With