potatoqualitee / kbupdate

🛡 KB Viewer, Saver, Installer and Uninstaller
MIT License
338 stars 50 forks source link

Not able to download Windows 11 22H2 data #226

Open shrishti01 opened 1 year ago

shrishti01 commented 1 year ago

Hello all,

I am not able to download patches details using kbupdate module using the following command for eg "Get-KbUpdate -Name KB5030219", basically all "Windows11 22H2" Microsoft products. _ Please suggest how to fetch this information, as I am always missing patches details for Windows11 22H2._

Thanks in Advance

BWarmuskerken commented 9 months ago

I seem to have this same issue, also with some Windows 2022 KBs. Has there been a work-around or fix posted?

BWarmuskerken commented 7 months ago

the main issue is that MS changed the download links in the dialog. There is no longer a download.windowsupdate link in the dialog for Win 11, it is catalog.sf.dl.delivery.mp.microsoft.com.

Changing this line in Get-KBUpdate seems to work for me for Win 11 $links = $downloaddialog | Select-String -AllMatches -Pattern "(http[s]?\://.download.windowsupdate.com\/[^\'\""])" | Select-Object -Unique $links = $downloaddialog | Select-String -AllMatches -Pattern "(http[s]?\://.catalog.sf.dl.delivery.mp.microsoft.com\/[^\'""])" | Select-Object -Unique

BWarmuskerken commented 7 months ago

Edit C:\Program Files\WindowsPowerShell\Modules\kbupdate\2.0.27\public\Get-KbUpdate.ps1 add if statement after line 693 $links = $downloaddialog | Select-String -AllMatches -Pattern "(http[s]?\://.download.windowsupdate.com\/[^\'\""])" | Select-Object -Unique if (-not $links) { $links = $downloaddialog | Select-String -AllMatches -Pattern "(http[s]?\://.catalog.sf.dl.delivery.mp.microsoft.com\/[^\'""])" | Select-Object -Unique } `

mae1cum77 commented 7 months ago

Just tested the changes of @BWarmuskerken and can confirm it's finding info and links now - marvelous, indeed!

BWarmuskerken commented 4 months ago

I am by no means an expert, where does the change fail for you?

On May 10, 2024 2:12 PM EDT tayzer522 ***@***.***> wrote:

 

 

  I'm having this same issue. I've tried to implement @BWarmuskerken 's fix to no avail. Anyone have any other ideas? This completely breaks one of my automation scripts on a fairly large scale. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

tayzer522 commented 4 months ago

I am by no means an expert, where does the change fail for you? On May 10, 2024 2:12 PM EDT tayzer522 @.> wrote:       I'm having this same issue. I've tried to implement @BWarmuskerken 's fix to no avail. Anyone have any other ideas? This completely breaks one of my automation scripts on a fairly large scale. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>

I got it fixed already. I think the issue was with using a cached version

BWarmuskerken commented 4 months ago

What I found is that even though you may close the ISE, you need to go to taskmanager and kill the powershell processes listed.  I stumbled on that for a while too.

 

Have a good weekend.

On May 10, 2024 3:31 PM EDT tayzer522 ***@***.***> wrote:

 

 

 

I am by no means an expert, where does the change fail for you? On May 10, 2024 2:12 PM EDT tayzer522 @.> wrote:       I'm having this same issue. I've tried to implement @BWarmuskerken 's fix to no avail. Anyone have any other ideas? This completely breaks one of my automation scripts on a fairly large scale. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.> 

I got it fixed already. I think the issue was with using a cached version —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

ZJPat commented 2 months ago

Edit C:\Program Files\WindowsPowerShell\Modules\kbupdate\2.0.27\public\Get-KbUpdate.ps1 add if statement after line 693 $links = $downloaddialog | Select-String -AllMatches -Pattern "(http[s]?://.download.windowsupdate.com/[^\'\""])" | Select-Object -Unique if (-not $links) { $links = $downloaddialog | Select-String -AllMatches -Pattern "(http[s]?://.catalog.sf.dl.delivery.mp.microsoft.com/[^\'""])" | Select-Object -Unique } `

Anyone was able to get this to work? Can you please submit a commit to get the module updated.

Thanks

mae1cum77 commented 2 months ago

Anyone was able to get this to work? Can you please submit a commit to get the module updated.

Thanks Since it works here on different machines, i took the liberty to craete my first pull request, hope i did correctly ;).

mrmattipants commented 1 month ago

I had to replace the dot, with a dot plus an asterisk, in the RegEx for .catalog.sf.dl.delivery.mp.microsoft.com/, as follows.

$links = $downloaddialog | Select-String -AllMatches -Pattern "(http[s]?://.download.windowsupdate.com/[^\'\""])" | Select-Object -Unique
if (-not $links) {
$links = $downloaddialog | Select-String -AllMatches -Pattern "(http[s]?://.*catalog.sf.dl.delivery.mp.microsoft.com/[^\'""])" | Select-Object -Unique
}
mrmattipants commented 1 month ago

i suppose you could also remove the dot, altogether ;)