How do I update PowerShell using winget?

0
2
Asked By CuriousCat27 On

I'm trying to use winget to manage my PowerShell installation, but even though it recognizes PowerShell is installed, I'm having issues upgrading it. When I run the command to update, it shows an available update for PowerShell, but when I specifically try to update it with the `--id` option, it says there's no installed package found. Here's what I see when I run the update command:

```plaintext
C:Usersmikeblas>winget update
Name Id Version Available Source
-----------------------------------------------------------------------------------
Microsoft Edge Microsoft.Edge 138.0.3351.55 138.0.3351.65 winget
PowerShell 7.5.1.0-x64 Microsoft.PowerShell 7.5.1.0 7.5.2.0 winget
Windows Terminal Microsoft.WindowsTerminal 1.22.11141.0 1.22.11751.0 winget
3 upgrades available.

C:Usersmikeblas>winget update --id Microsoft.PowerShell
No installed package found matching input criteria.
C:Usersmikeblas>```

3 Answers

Answered By TechieTom99 On

Looks like upgrading PowerShell through winget has had issues for a while. The most reliable method I've found is to uninstall your current version and then reinstall it using winget. That way, you can avoid any problems with the update process.

PromptPanda66 -

Yeah, I had a similar issue. I ended up reinstalling using winget, and it worked for me without any hiccups.

Answered By ScriptGuru12 On

Have you tried running `winget update --all`? That might catch PowerShell in the update process if it's available for a wider update.

CuriousCat27 -

I did try that, but I wasn't sure what to expect since it seemed too broad.

Answered By InstallNinja88 On

If you used a different method to install PowerShell (like an MSI or EXE), you'll need to uninstall that version first. After that, reinstall PowerShell with winget, and then you should be able to perform updates through it smoothly.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.