By switching from PowerShell to Command Prompt to do the job, this update trick delivers clean PS 7.3.7 install. Duh!

Update Trick Delivers Clean PS 7.3.7 Install

OK, then, Here’s an interesting way to handle the September 19 update for PowerShell, from 7.3.6 to 7.3.7. Indeed this specific update trick delivers clean PS 7.3.7 install. I’ve run into minor glitches on previous up-versions, because I was using PowerShell to update itself. It would show cancelled as its final update status, as the old runtime had to fall over to get itself out of the way for the new one.

You can see this at work in the lead-in graphic. It shows the Installer running to update PowerShell as a pop-up within the PS windows itself. In fact, it runs to completion without issues. Why? Because I closed the open default PS session and ran the PS update inside an Administrative Command Prompt session instead.

Which Update Trick Delivers Clean PS 7.3.7 Install?

Because PS essentially interferes with itself if it runs the upgrade from one version to the next, the trick is NOT to use PowerShell. That’s why I switched to Command Prompt instead, and ran the upgrade there. No strange behavior, no “Cancelled” status at the end, nothing weird at all, in fact. You can see a new PS session window at right here with the new 7.3.7 version clearly identified (the left-hand side shows the complete PS upgrade in Command Prompt):

Update Trick Delivers Clean PS 7.3.7 Install.split-window

Once the update is finished I used the Command Palette to open a PS session split-right, which shows the new version running.

I’ll have to remember this for future PS updates. I’ve just used this technique on a half-dozen test PCs and it works like a charm!

 

Facebooklinkedin
Facebooklinkedin

4 thoughts on “Update Trick Delivers Clean PS 7.3.7 Install”

  1. This appears to be a very powerful “trick”.

    Be cautious. If you have several items which can be updated, it will update them all. In my case, it updated 25 items, including Visual Studio, for which it gave a message that it could not complete and that the system required a restart to finish. After all 25 items were updated, I rebooted. Everything looks good, and Visusal Studio 2022 has been updated to version 17.7.4. However, powershell is still at version 7.3.6, it was not updated to version 7.3.7.

    I am running Windows 10, build 19045.

    1. For a more focused approach use the winget upgrade Microsoft.PowerShell syntax instead. That way you can avoid other pending updates. Again, as in my previous reply run it inside Command Prompt and you’ll avoid the issues that come when you update PowerShell while PowerShell itself is running.
      Thanks!
      –Ed–

  2. I then rebooted and tried again with the commands:
    winget upgrade powershell
    and
    winget upgrade Microsoft.Powershell

    They both failed. See below.

    Microsoft Windows [Version 10.0.19045.3448]
    (c) Microsoft Corporation. All rights reserved.

    C:\Windows\system32>winget upgrade
    Name Id Version Available Source
    ———————————————————————————————————————–
    Google Chrome Google.Chrome 116.0.5845.188 117.0.5938.92 winget
    Mozilla Thunderbird (x64 en-US) Mozilla.Thunderbird.Beta > 117.0b4 118.0b2 winget
    PostgreSQL 15 PostgreSQL.PostgreSQL 15 15.3.1 winget
    Microsoft Windows Desktop Runtime – 6.0.22 (x64) Microsoft.DotNet.DesktopRuntime.7 < 7.0.0 7.0.11 winget
    Microsoft Visual C++ 2010 x86 Redistributable -… Microsoft.VCRedist.2010.x86 10.0.30319 10.0.40219 winget
    Microsoft Windows Desktop Runtime – 6.0.22 (x86) Microsoft.DotNet.DesktopRuntime.7 < 7.0.0 7.0.11 winget
    Google Drive Google.GoogleDrive 1.31.2873.2758 81.0.5.0 winget
    Microsoft .NET Core Runtime – 3.1.32 (x64) Microsoft.DotNet.AspNetCore.7 < 7.0.0 7.0.11 winget
    PowerShell 7.3.6.0-x64 Microsoft.PowerShell 7.3.6.0 7.3.7.0 winget
    Microsoft Visual C++ 2010 x64 Redistributable -… Microsoft.VCRedist.2010.x64 10.0.30319 10.0.40219 winget
    Microsoft ASP.NET Core 6.0.22 – Shared Framework… Microsoft.DotNet.AspNetCore.7 < 7.0.0 7.0.11 winget
    Microsoft ASP.NET Core 6.0.22 – Shared Framework… Microsoft.DotNet.AspNetCore.7 < 7.0.0 7.0.11 winget
    Microsoft .NET SDK 6.0.203 (x64) Microsoft.DotNet.SDK.6 6.0.203 6.0.414 winget
    Python 3.9.13 (64-bit) Python.Python.3.10 winget upgrade powershell
    No available upgrade found.
    No newer package versions are available from the configured sources.

    C:\Windows\system32>winget upgrade Microsoft.Powershell
    A newer version was found, but the install technology is different from the current version installed. Please uninstall the package and install the newer version.

    C:\Windows\system32>

    1. If you run the winget commands from Command Prompt, and close the PowerShell session/window, it should work OK. The issue when PS updates itself is best understood as “non-graceful termination” when the update finishes. Even then it works, but you must close and reopen WT to clean things up.
      HTH, and thanks for posting.
      –Ed–

Leave a Reply

Your email address will not be published. Required fields are marked *