Open wstr-ncrum opened 2 years ago
Same terminal different version of powershell
I hate to ask, but did you try restarting the terminal and/or Windows? I'll try to reproduce this.
I just had PowerShell 5.1:
denelon ~ $PSVersionTable.PSVersion in pwsh at 08:28:43
Major Minor Build Revision
----- ----- ----- --------
5 1 25201 1000
I installed the latest version and restarted Windows Terminal:
PS C:\Users\denelon> $PSVersionTable.PSVersion
Major Minor Patch PreReleaseLabel BuildLabel
----- ----- ----- --------------- ----------
7 2 6
winget worked:
PS C:\Users\denelon> winget -v
v1.4.2161-preview
I did do a restart. Did you run the version as administrator as well. That seems to be the thing for me. If I launch Windows terminal as admin and use powershell 7 it doesn't work
Winget works with default powershell instance using 5.1 on Windows 10 professional. After installing powershell 7 I attempted running any commands including
winget --version
and they all fail with the same message as shown below.edit: only happening in Admin launched prompts