Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Powershell update from 7.2 to 7.4 not occurring #26010

@GaetanRabier

Description

@GaetanRabier

Prerequisites

Steps to reproduce

The update from version 7.2 of PowerShell to version 7.4, both LTS, does not work as expected when using Microsoft Updates.

The behavior we expect is to see an update to the 7.4 version with Windows Update as stated in the documentation shared earlier and seen below:

Microsoft Update changes for PowerShell 7 - PowerShell Team

So, to test this we’ve created a lab with a newly created machine running Windows 11 24H2 and installed version 7.2.17 on the server.

This is where the log collections started.

The context of the first log collection is the update from version 7.2.17 to the latest version of PowerShell 7.2 which is 7.2.24 using Windows Update.

I started the trace before clicking on the Windows Update button to search for updates.

In this Windows Update trace, we could find that the version we're in is detected:

1041430 [0]15E0.1B10::08/28/25-13:16:40.5016673 [WUTraceLogging] [EEHandler] Info=Version from cache: File=C:\Program Files\PowerShell\7\pwsh.exe, Version=7.2.17.500

And after this, we can see a search happening for the latest version of PowerShell that we can update to:

1100019 URL: http://download.windowsupdate.com/c/msdownload/update/software/updt/2024/08/powershell-7.2.23-win-x64_2afa4629742b6c0f3159fd3d560c273790cf1e2e.exe

1100022 URL: http://download.windowsupdate.com/c/msdownload/update/software/updt/2023/11/powershell-7.2.17-win-x64_44f95e705c791819a8424f57929066f1fd6a41a1.exe

1100025 URL: http://download.windowsupdate.com/d/msdownload/update/software/updt/2024/01/powershell-7.2.18-win-x64_76be9679fa6d5c24c805e398e32d1e6d97055328.exe

1100028 URL: http://download.windowsupdate.com/c/msdownload/update/software/updt/2024/04/powershell-7.2.19-win-x64_ccbd017c5bc42dfd698fe8937c2f1da2586be884.exe

1100106 URL: http://download.windowsupdate.com/d/msdownload/update/software/updt/2024/10/powershell-7.2.24-win-x64_3db546fc99d1bcf89758404d2f1503b846d7d318.exe

1100559 URL: http://download.windowsupdate.com/c/msdownload/update/software/updt/2024/08/powershell-7.2.23-win-x64_2afa4629742b6c0f3159fd3d560c273790cf1e2e.exe

1100562 URL: http://download.windowsupdate.com/c/msdownload/update/software/updt/2023/11/powershell-7.2.17-win-x64_44f95e705c791819a8424f57929066f1fd6a41a1.exe

1100565 URL: http://download.windowsupdate.com/d/msdownload/update/software/updt/2024/01/powershell-7.2.18-win-x64_76be9679fa6d5c24c805e398e32d1e6d97055328.exe

1100568 URL: http://download.windowsupdate.com/c/msdownload/update/software/updt/2024/04/powershell-7.2.19-win-x64_ccbd017c5bc42dfd698fe8937c2f1da2586be884.exe

1100613 URL: http://download.windowsupdate.com/d/msdownload/update/software/updt/2024/10/powershell-7.2.24-win-x64_3db546fc99d1bcf89758404d2f1503b846d7d318.exe

We reach the conclusion that it is PowerShell 7.2.24 and proceed with the update:

1121999 [1]15E0.0F84::08/28/25-13:16:51.1354557 [WUTraceLogging] [Agent] Info= Title = PowerShell LTS v7.2.24 (x64)

1135734 [1]15E0.0724::08/28/25-13:17:17.5602762 [WUTraceLogging] [DownloadManager] Info=Successfully downloaded file from http://au.download.windowsupdate.com/d/msdownload/update/software/updt/2024/10/powershell-7.2.24-win-x64_3db546fc99d1bcf89758404d2f1503b846d7d318.exe to C:\Windows\SoftwareDistribution\Download\c38cd6c24a92bb6a7f2f990c21c0a258\3db546fc99d1bcf89758404d2f1503b846d7d318.

This is the normal behavior where the update is searched for and done correctly.

Now, since the customer's issue is the update from PowerShell 7.2 to 7.4, we've collected a new trace where the latest 7.2 version is already installed on the same machine thanks to WU and we attempt a new update by running Windows Update once again.

We can see here that the current version is detected:

329664 [0]1BB8.1AF4::08/28/25-13:59:48.7104228 [WUTraceLogging] [EEHandler] Info=Version from cache: File=C:\Program Files\PowerShell\7\pwsh.exe, Version=7.2.24.500

But we see no search for the new version.

We've noticed that this version carries an UpdateId, which with a quick search, we found that it brings us to the Update Catalog of the 7.2.24 version of PowerShell:

Microsoft Update Catalog

What we did after was searching in the same Catalog for the 7.4 LTS versions which we expect the update to happen to and we used ID 746d34b0-a405-4c05-b1bd-6de5acd489c6 which corresponds to version 7.4.10.

When we search for this ID in the same trace, we found this:

301341 [0]1BB8.1AF4::08/28/25-13:59:48.0735286 [WUTraceLogging] [Agent] Info=Final detection state for bundle update 43286929 (updateId = 746D34B0-A405-4C05-B1BD-6DE5ACD489C6.200) is "NotApplicable"

It seems like for some reason, this update is deemed as NotApplicable and will, therefore, not complete an update to this version.

This is true for the two other versions of PowerShell in the Update Catalog.

7.4.11:

301334 [0]1BB8.1AF4::08/28/25-13:59:48.0735141 [WUTraceLogging] [Agent] Info=Final detection state for bundle update 43565515 (updateId = F8322A34-F333-476F-9B00-26F69E9EF2EE.201) is "NotApplicable"

7.4.7:

301348 [0]1BB8.1AF4::08/28/25-13:59:48.0735429 [WUTraceLogging] [Agent] Info=Final detection state for bundle update 42885628 (updateId = FBD9CDEB-752E-4616-A3D0-3D85F0B5B39E.200) is "NotApplicable"

What we need to understand now is if this update was supposed to happen according to the documentation and both versions are LTS which makes the requirements for an update true, what makes it NotApplicable?

Is it another requirement that we're not aware of?

Is it a configuration missing from the customer's side in order for this update to work?

@theJasonHelmick as discussed

Expected behavior

.

Actual behavior

.

Environment data

.

OS Data

.

Windows update log

.

Visuals

No response

Metadata

Metadata

Assignees

Labels

Needs-TriageThe issue is new and needs to be triaged by a work group.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions