Description
First off, thank you @potatoqualitee for this awesome package.
I have a question on the workflow for updating a bunch of offline desktops in a lab. They will potentially have different version of updates, so I'd like to scan each one to see which are required, then download them from a different, internet connected computer.
Right now, I've been running: Get-KbNeededUpdate -ScanfilePath D:\wsusscn2.cab and saving the output to removable media.
Then once I'm online on a different system, going through that output and downloading the updates with: Save-KbUpdate -Name
Is there a way to do it all in one shot? To feed the output of Get-KbNeededUpdate into Save-KbUpdate by saving that output on removable media?
Alternatively, I like the idea of just pulling every KB and making a mirror of every update I may need, but I'm hitting the same error I've seen a few people mention:
PS C:\temp> Get-KbUpdate -Since (Get-Date).AddDays(-90) -Architecture x64 | Save-KbUpdate -Path C:\temp
[ ... ]
Save-KbUpdate : Cannot bind argument to parameter 'Link' because it is null.
At line:3 char:5
+ Save-KbUpdate -Path C:\temp
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (@{UpdateId=01b5...rsedes=; Link=}:PSObject) [Save-KbUpdate], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Save-KbUpdate
I saw a few different fixes in other threads, but is there a definitive one I should use?
Another issue I've had is, sometimes, the files that Get-KbNeededUpdate says I need, when downloaded on the second machine, end up not matching. for example:
offline system:
PS C:\Windows\system32> Get-KbNeededUpdate -ScanfilePath D:\wsusscn2.cab
ComputerName : DESKTOP-I5FPCU5
Title : 2024-12 Cumulative Update for Windows 10 Version 22H2 for x64-based Systems (KB5048652)
KBUpdate : KB5048652
UpdateId : abfafad8-5378-48df-a64f-deedc7de0f5a
Link : {https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2024/12/windows10.0
-kb5048652-x64_59844d513d571636b5711a4a01037f5f64a98f63.cab}
online system:
PS C:\downloads> Get-KbUpdate -Name abfafad8-5378-48df-a64f-deedc7de0f5a -Simple -Architecture x64 -Latest -OperatingSystem 'Windows 10' -Verbose | Save-KbUpdate
[ ... ]
-a---- 12/12/2024 1:40 PM 702474513 windows10.0-kb5048652-x64_279b3aca56a2aa72aa2d08ccc30fad69bd5a1e29.msu
The file it downloads doesn't match, and when I bring that file back onto the offline system and install updates:
PS C:\Windows\system32> Install-KbUpdate @params
WARNING: [13:54:04][<ScriptBlock><Process>] Couldn't copy
windows10.0-kb5048652-x64_59844d513d571636b5711a4a01037f5f64a98f63.cab from repo to localhost. | Cannot find path
'D:\downloads\windows10.0-kb5048652-x64_59844d513d571636b5711a4a01037f5f64a98f63.cab' because it does not exist.
It fails since it's looking for the original name.