Update BuildFFUVM.ps1

- Updated MU Catalog search
- Search now includes searching for Windows Server updates

Has been verified to work for Windows Server 2022 and Windows Server 2025 only.
This commit is contained in:
JonasKloseBW
2024-09-23 04:26:30 +02:00
committed by GitHub
parent ac485f9c87
commit b8bda93e8d
+18 -2
View File
@@ -4233,7 +4233,15 @@ try {
#The Windows release info page is updated later than the MU Catalog #The Windows release info page is updated later than the MU Catalog
if ($UpdateLatestCU -and -not $UpdatePreviewCU) { if ($UpdateLatestCU -and -not $UpdatePreviewCU) {
Writelog "`$UpdateLatestCU is set to true, checking for latest CU" Writelog "`$UpdateLatestCU is set to true, checking for latest CU"
$Name = """Cumulative update for Windows $WindowsRelease Version $WindowsVersion for $WindowsArch""" if ($WindowsRelease -le 11) {
$Name = """Cumulative update for Windows $WindowsRelease Version $WindowsVersion for $WindowsArch"""
} elseif ($WindowsRelease -eq 2022) {
$Name = """Cumulative Update for Microsoft server operating system, version $WindowsVersion for $WindowsArch"""
} elseif ($WindowsRelease -lt 2022) {
$Name = """Cumulative update for Windows 10 Version $WindowsVersion for $WindowsArch"""
} else {
$Name = """Cumulative update for Windows 11 Version $WindowsVersion for $WindowsArch"""
}
#Check if $KBPath exists, if not, create it #Check if $KBPath exists, if not, create it
If (-not (Test-Path -Path $KBPath)) { If (-not (Test-Path -Path $KBPath)) {
WriteLog "Creating $KBPath" WriteLog "Creating $KBPath"
@@ -4248,7 +4256,15 @@ try {
#will take Precendence over $UpdateLastestCU if both were set to $true #will take Precendence over $UpdateLastestCU if both were set to $true
if ($UpdatePreviewCU) { if ($UpdatePreviewCU) {
Writelog "`$UpdatePreviewCU is set to true, checking for latest Preview CU" Writelog "`$UpdatePreviewCU is set to true, checking for latest Preview CU"
$Name = """Cumulative update Preview for Windows $WindowsRelease Version $WindowsVersion for $WindowsArch""" if ($WindowsRelease -le 11) {
$Name = """Cumulative update Preview for Windows $WindowsRelease Version $WindowsVersion for $WindowsArch"""
} elseif ($WindowsRelease -eq 2022) {
$Name = """Cumulative Update Preview for Microsoft server operating system, version $WindowsVersion for $WindowsArch"""
} elseif ($WindowsRelease -lt 2022) {
$Name = """Cumulative update Preview for Windows 10 Version $WindowsVersion for $WindowsArch"""
} else {
$Name = """Cumulative update Preview for Windows 11 Version $WindowsVersion for $WindowsArch"""
}
#Check if $KBPath exists, if not, create it #Check if $KBPath exists, if not, create it
If (-not (Test-Path -Path $KBPath)) { If (-not (Test-Path -Path $KBPath)) {
WriteLog "Creating $KBPath" WriteLog "Creating $KBPath"