mgajda83 / PSWindowsUpdate

This module contain cmdlets to manage Windows Update Client.
MIT License
276 stars 25 forks source link

No output Titles on w11 23h2 build 3880 #31

Open rrosenau opened 1 month ago

rrosenau commented 1 month ago

Hello,

I'm using the great PSWindowsUpdate module for a few years. I'm using a script in the oobe phase to update the client before ESP Enrollment (autopilot)

When I use Get-WindowsUpdate in the July build 3880 the output also do not show Titles anymore.

I use the Titles in a Teams Notification when a device is installed. Below is my script. All previous W11 builds show always Titles.

================================================

[OS] Install Software updates

================================================

if ($($xml.Collect.WINPE.EnableUpdates) -eq "True") { Write-Host "$(Logstamp) Updates from Microsoft Update download " -NoNewline Write-Host @CheckIconSquareRoot $ProgressPreference = 'Continue' Add-WUServiceManager -MicrosoftUpdate -Confirm:$false | Out-Null $softwareupdates = Install-WindowsUpdate -MicrosoftUpdate -NotCategory "Drivers" -NotTitle "Preview" -AcceptAll -IgnoreReboot | Out-File "c:\OSDCloud\WindowsUpdate.log" -force $Pathsetupd = "c:\OSDCloud\WindowsUpdate.log" (gc $Pathsetupd) | ? {$.trim() -ne "" } | set-content $Pathsetupd $waardesset = Get-Content $Pathsetupd| Select-String -Pattern 'Installed' $upd3 = $waardesset -replace "(?m)^.{43}" $resultsoftwareupdatessplit = $upd3 | foreach {$ + "
"} $upd3 | foreach { Write-Host "$(Logstamp) Installed $
" -NoNewline Write-Host @CheckIconSquareRoot } Write-Host "$(Logstamp) Updates from Microsoft Update installed " -NoNewline Write-Host @CheckIconSquareRoot }

xenon8 commented 1 month ago

I have found the same issue, it looks like it is an issue with the object that is returned.

Example of working server (Windows Server 2022):

image

Example of a new Windows 11 (built yesterday using latest Azure Windows 11 image)

image

As you can see, it has returned a completely different object.

I have tested with the latest release 2.2.1.5 and 2.2.1.4.

xenon8 commented 1 month ago

There was new patch this morning when I did a manual Windows Update, after installing this and doing a reboot it fixed the issue.

These are the two KBS that were installed:

KB5040527 & KB5040568

plao commented 1 month ago

Microsoft Bug: https://learn.microsoft.com/en-us/windows/release-health/status-windows-11-23H2#the-june-2024-preview-update-might-impact-applications-using-windows-update-apis

plao commented 1 month ago

There was new patch this morning when I did a manual Windows Update, after installing this and doing a reboot it fixed the issue.

These are the two KBS that were installed:

KB5040527 & KB5040568

Nice to know, thx for posting, man!

robvh1 commented 1 month ago

I've a simular issue, not sure if it's the same. Titles of the updates are no longer returned on the scan in the object image

However during the scan (does not matter if remote or with enter-psssession) the progress bar show the titles image

All affected systems seem to be running win11 pro (as most are), can't really see if they installed the preview The returned object is indeed simular to the above example of win11 (it has no title as a member)

To add to the strange behavior, the returned object has a member KB, however selecting it with $entry.kb just returns an empty string