mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
fix: Microsoft Update Catalog now includes the windows version information in the KB article title. This caused an issue where parsing the KB article was failing. Fixed the regex to accomdate this.
This commit is contained in:
@@ -2069,7 +2069,7 @@ function Get-KBLink {
|
||||
# Extract the first KB article ID from the HTML content and store it globally
|
||||
# Edge and Defender do not have KB article IDs
|
||||
if ($Name -notmatch 'Defender|Edge') {
|
||||
if ($results.Content -match '>\s*([^\(<]+)\(KB(\d+)\)\s*<') {
|
||||
if ($results.Content -match '>\s*([^\(<]+)\(KB(\d+)\)(?:\s*\([^)]+\))*\s*<') {
|
||||
$kbArticleID = "KB$($matches[2])"
|
||||
$global:LastKBArticleID = $kbArticleID
|
||||
WriteLog "Found KB article ID: $kbArticleID"
|
||||
|
||||
Reference in New Issue
Block a user