Here’s something I didn’t know before. Or at least, I never tried it. Just recently (November 8) MS released a new 7.3.0 version of PowerShell to GitHub. I’ve been upgrading my various systems since, slowly but surely. This morning I learned that opting for Repair upgrades PowerShell. Let me show you what that means.
Showing How Repair Upgrades PowerShell
On some PCs, winget upgrade may not show the new PowerShell as an option. (I’ll use my Lenovo Yoga 7i as an illustration because it manifests such behavior.) You can see it’s running version 7.2.7 and that PowerShell does not show up in the output from winget upgrade below:
If that’s the case, here are the steps to using repair to upgrade PowerShell on such PCs:
1. CTRL-Click on the link that reads https://aka.ms/powershell. This opens the MS PowerShell Documentation page.
2. Click on the “Download PowerShell” button at the upper right. This takes you to the GitHub Latest release page for PowerShell (7.3.0, as I write this, but updated as new versions emerge). Then close all open PowerShell sessions.
3. Scroll down to assets and download the installer file for your PC (for most readers the 64-bit MSI is the right choice: PowerShell-7.3.0-win-x64.msi)
4. Run the microsoft self-installing (MSI) file to start PowerShell installation. Step through all the installer prompts. If the Repair option comes up, select it (shown in the lead-in graphic for this story). It will run and “fix” the current installation.
At the end of this process, you’ll have a working upgrade to version 7.3.0. Cheers!
What About Winget Upgrade Microsoft.Powershell?
Gosh! That works too but finishes strange. Let me show you, in the following screencap (click on image to view full-sized):
The output doesn’t actually confirm a successful install of PowerShell 3.7.0. It shows a progress bar, and a status of “Starting package install…” Then it transitions to a command prompt. In the background, the new version is installed and running. But because you’ve got a 7.2.7 window open, you don’t see the 7.3.0 label until you close the old window and open a new one.
It’s always something, right?