From ac485f9c871695f90f7f2d6fb2ecc77978b71630 Mon Sep 17 00:00:00 2001 From: JonasKloseBW Date: Mon, 23 Sep 2024 04:16:57 +0200 Subject: [PATCH] Update BuildFFUVM.ps1 - Update Get-WindowsVersionInfo - Server Standard is now called 'Srv_Std' - Server Datacenter is now called 'Srv_Dtc' - 17763 is matched as Windows Server 2019 - 20348 is matched as Windows Server 2022 - 26100 is matched as Windows Server 2025 - other versions are matched as $DisplayVersion as a fallback Please remember to update the Windows Server version of 2025 in case it changes until release. --- FFUDevelopment/BuildFFUVM.ps1 | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/FFUDevelopment/BuildFFUVM.ps1 b/FFUDevelopment/BuildFFUVM.ps1 index 832949e..48bd118 100644 --- a/FFUDevelopment/BuildFFUVM.ps1 +++ b/FFUDevelopment/BuildFFUVM.ps1 @@ -3265,14 +3265,25 @@ Function Get-WindowsVersionInfo { Enterprise { 'Ent' } Education { 'Edu' } ProfessionalWorkstation { 'Pro_Wks' } + ServerStandard { 'Srv_Std' } + ServerDatacenter { 'Srv_Dtc' } } WriteLog "Windows SKU Modified to: $SKU" - if ($CurrentBuild -ge 22000) { - $Name = 'Win11' - } - else { - $Name = 'Win10' + if ($SKU -notmatch "Srv") { + if ($CurrentBuild -ge 22000) { + $Name = 'Win11' + } + else { + $Name = 'Win10' + } + } else { + $Name = switch ($CurrentBuild) { + 26100 { '2025' } + 20348 { '2022' } + 17763 { '2019' } + Default { $DisplayVersion } + } } WriteLog "Unloading registry"