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

How to add new entries to the local database? #223

Open
mjmeans opened this issue Jul 20, 2023 · 1 comment
Open

How to add new entries to the local database? #223

mjmeans opened this issue Jul 20, 2023 · 1 comment

Comments

@mjmeans
Copy link

mjmeans commented Jul 20, 2023

So when doing a server restore (or forensic server analysis) it can happen that you need requires KBs containing specific file versions that are no longer published by MS in the update catalog; though they are still available if you can find the direct link to windowsupdate.com. When doing local work using Get-KbUpdate -Source DATABASE, I see that kb's are also not listed. How do I add this information to the local db? And where is the local db stored and can it be copied from one machine to another?

@Hitman86R
Copy link

Hitman86R commented Nov 28, 2024

@mjmeans I know it's a bit late, but I recently discovered kbupdate, I was also interested in updating the local database, so I read all the files in the kbupdate repository and found the way (already present in the package but not usable without changes, I'll explain how to do it:

  • Go to the folder where the kbupdate package is installed on your machine (usually C:\Program Files\WindowsPowerShell\Modules\kbupdate"kb version number")

  • in the public folder, open the Get-KbUpdate script with your favorite editor

  • After "[switch]$Enable Exception" (line 115) add the comma and insert [switch]$LocalDbUpdate

         ... 
        [string]$CustomQuery, 
        [switch]$EnableException, 
        [switch]$LocalDbUpdate 
    ) 
         ... 

  • then under line 180 add:
...
        if ($LocalDbUpdate){
            Update-KbDatabase
        }
...
  • download the official kbupdate repo, extract it, copy the "build" folder inside the kbupdate path in exactly the same position where the public folder is located

  • Open powershell as administrator and run:

Import-module kbupdate -force

then

Get-KbUpdate -LocalDbUpdate

  • Wait for it to finish. The local database is up to date

Ask if there are any problems, I may have forgotten some steps (although I don't think so)

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

2 participants