Download Newest Windows 11x64 CUs for: System & .NET Framework with PowerShell or any other automation tool

78 Views Asked by At

I'm trying to create automation script for download last offline versions of Windows Update CUs for Windows11 23H2 x64 (.msu installation files).

I created PowerShell code for that based on that page: How to download and install offline Windows updates with PowerShell but I stuck somehow on last download step. This is my code for download:

Install-Module -Name "MSCatalog"
Update-Module -Name "MSCatalog"
$DestinationDir = "D:\WinUpd"


# CU Standard
$UpdCUStandardName      =   "Cumulative Update for Windows 11 Version 23H2 for x64-based Systems"

(Get-MSCatalogUpdate -Search $UpdCUStandardName) | Where { $_.Title -match $UpdCUStandardName } | Select -First 1 | FL

$UpdCUStandardGuid      =   ((Get-MSCatalogUpdate -Search $UpdCUStandardName) | Where { $_.Title -match $UpdCUStandardName } | Select -First 1 | Select-Object -Property "Guid").Guid
$UpdCUStandardTitle     =   ((Get-MSCatalogUpdate -Search $UpdCUStandardName) | Where { $_.Title -match $UpdCUStandardName } | Select -First 1 | Select-Object -Property "Title").Title

Write-Host "UpdCUStandardGuid is: $UpdCUStandardGuid"
Write-Host "UpdCUStandardTitle is: $UpdCUStandardTitle"


Save-MSCatalogUpdate -Guid $UpdCUStandardGuid -Destination $DestinationDir

And how its works and stuck is on bellow printscreen: Screen

Even I putted there Guid to download (what I understand as unique name) script stuck and ask me: "Multiple files exist for this update. Enter the Id of the file to download or 'A' to download all files.:" When I press 'A', nothing is download and its basically quits. I already tried also write 0,1, Guid, but with no luck.

From Other hand, when I change $UpdCUStandardName = "Cumulative Update for Windows 11 Version 23H2 for x64-based Systems" to $UpdCUStandardName = "Cumulative Update for Windows Server 2019 for x64-based Systems (KB5034127)" its gonna work: enter image description here

Did I done something wrong in my code, or CUs for Win11 is somehow blocked to download with PS command 'Save-MSCatalogUpdate'? Or maybe there is another method (tool) to automatically after "path day" download all of them?

0

There are 0 best solutions below