diff --git a/CHANGELOG.md b/CHANGELOG.md index 90918e0..2dd35a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- `-Action ProductUpdate` no longer leaves a **stale pre-install Patch Status** on the Binaries Installation card after installing a cumulative update. The live refresh added in #59 read the product/patch status from the configuration-database cache (`SPProductVersions.GetProductVersions`), which is not updated by a local binary install until `Get-SPProduct -Local` runs on the server. SPSUpdate now refreshes the local server's product cache with `Get-SPProduct -Local` before reading, so the card shows the real post-install status (for example `Upgrade Blocked` / `Installation Required`) instead of the pre-install value (`No Action Required`). ([#71](https://github.com/luigilink/SPSUpdate/issues/71)) + ## [5.2.0] - 2026-10-07 ### Changed diff --git a/src/SPSUpdate.ps1 b/src/SPSUpdate.ps1 index 682f5d9..530fc5f 100644 --- a/src/SPSUpdate.ps1 +++ b/src/SPSUpdate.ps1 @@ -1430,10 +1430,11 @@ Shutdown Services: $($envCfg.Binaries.ShutdownServices) else { $puInstalledBuild = '' try { $puInstalledBuild = (Get-SPSInstalledProductVersion).FileVersion.ToString() } catch { $puInstalledBuild = '' } - # Refresh this server's live Patch Status only after a real install, so the card - # shows the post-install state (no-op runs keep the last-known-good value). + # Refresh live Patch Status only after a real install. Get-SPSServersPatchStatus + # reads the config-DB product cache, so refresh this server with -Local first. $puPatchStatus = '' if ($installPerformed) { + try { $null = Get-SPProduct -Local -ErrorAction Stop } catch { Write-Verbose -Message "Get-SPProduct -Local refresh failed: $($_.Exception.Message)" } try { $puPatchStatus = ConvertTo-SPSPatchStatusLabel -Status "$(Get-SPSServersPatchStatus -Server $thisServer)" } catch { $puPatchStatus = '' } } if ([string]::IsNullOrWhiteSpace($puPatchStatus)) {