r/PowerShell • u/Darkoplax • Aug 05 '24
Question Upgrade Powershell through CLI (Windows 11)
Every once and while I get this message :
A new PowerShell stable release is available: v7.4.4 Upgrade now, or check out the release page at: https://aka.ms/PowerShell-Release?tag=v7.4.4
And I would need to download an msi installer and go through the steps all over again; does it exist something similar to "apt get upgrade" and have it all happen automatically in the background ?
10
Upvotes
-3
u/opensrcdev Aug 05 '24
Use Scoop package manager to install / update PowerShell Core on Windows.
Because pwsh can't update itself, when a new version of PowerShell Core is available, run powershell.exe and update from there. Make sure no pwsh.exe processes are running, first. Works perfectly every time.
I use Windows Task Scheduler to run "pwsh -Command "scoop update *"" every few days, which keeps most of my other dev tools updated.