ryan-jan / MSCatalog

PowerShell module for searching and downloading offline updates from https://www.catalog.update.microsoft.com
MIT License
58 stars 16 forks source link

downloading newer files (Windows 11) doesn't work #37

Open Arbelac opened 2 months ago

Arbelac commented 2 months ago

Hi,

its not downloading 2024-05 Cumulative Update for Windows 11 Version 23H2 for x64-based Systems (KB5037771) update. Just .Net framework updates is downloading such as 2024-05 Cumulative Update for .NET Framework 3.5 and 4.8.1 for Windows 11, version 23H2 for x64 (KB5037591).

PS C:\Windows\system32> Get-MSCatalogUpdate -AllPages -Search "$Date Cumulative Update Windows 11 Version 23H2 x64" -ExcludePreview

Title                                                                                                       Products   Classification   LastUpdated Size    
-----                                                                                                       --------   --------------   ----------- ----    
2024-05 Cumulative Update for .NET Framework 3.5 and 4.8.1 for Windows 11, version 23H2 for x64 (KB5037591) Windows 11 Updates          2024/05/14  66.5 MB 
2024-05 Cumulative Update for Windows 11 Version 23H2 for x64-based Systems (KB5037771)                     Windows 11 Security Updates 2024/05/14  712.5 MB

Script :

Get-MSCatalogUpdate -AllPages -Search "$Date Cumulative Update Windows 11 Version 23H2 x64" -ExcludePreview | Export-Csv -Path "C:\WINDOWSUPDATES\Win11.csv" -NoTypeInformation -Encoding UTF8
$OutFolder = "C:\KBUPDATEWIN11"
 $Updates=Get-MSCatalogUpdate -AllPages -Search "$Date Cumulative Update Windows 11 Version 23H2 x64" -ExcludePreview
if ($Updates -eq $null){ Write-Host "`r`nNo updates from $Date"} else {
    Foreach ($item in $Updates) { Save-MSCatalogUpdate -AcceptMultiFileUpdates -Update $item -Destination $OutFolder -Verbose }
}
Batchputz commented 2 months ago

try this: https://github.com/ryan-jan/MSCatalog/issues/30#issuecomment-1987357784

Arbelac commented 2 months ago

I tried that too. Unfortunately it doesn't work.

mscatalog
svetecs commented 2 months ago

I have this issue too. I use this module as part of my packer scripts to version my packer images based on the CU available at build time. When I search for Windows 11, the updates don't show (and -strict doesn't work).

image

svetecs commented 2 months ago

Nevermind, I got my issue sorted by :

Get-MSCatalogUpdate -AllPages -Search "Cumulative Update Windows 11 Version 23H2 x64" -Sort "Title" | Where-Object {$_.Title -like 'Cumulative Update for Windows 11'}

Marco-online commented 4 days ago

I only want the latest update so fixed it with

Get-UpdateLinks

$Regex = "downloadInformation\[0\]\.files\[0\]\.url\s*=\s*'([^']*)'"
$Links = [regex]::Matches($Links, $Regex)

Save-MSCatalogUpdate

if ($Update) {
    $Guid = $Update.Guid | Select-Object -First 1

}

$Links = Get-UpdateLinks -Guid $Guid if ($Links.Count -eq 1) {