Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow question #238

Open
username-andy-is-not-available opened this issue Dec 17, 2024 · 0 comments
Open

workflow question #238

username-andy-is-not-available opened this issue Dec 17, 2024 · 0 comments

Comments

@username-andy-is-not-available
Copy link

username-andy-is-not-available commented Dec 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant