mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
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.
This commit is contained in:
@@ -3265,15 +3265,26 @@ Function Get-WindowsVersionInfo {
|
|||||||
Enterprise { 'Ent' }
|
Enterprise { 'Ent' }
|
||||||
Education { 'Edu' }
|
Education { 'Edu' }
|
||||||
ProfessionalWorkstation { 'Pro_Wks' }
|
ProfessionalWorkstation { 'Pro_Wks' }
|
||||||
|
ServerStandard { 'Srv_Std' }
|
||||||
|
ServerDatacenter { 'Srv_Dtc' }
|
||||||
}
|
}
|
||||||
WriteLog "Windows SKU Modified to: $SKU"
|
WriteLog "Windows SKU Modified to: $SKU"
|
||||||
|
|
||||||
|
if ($SKU -notmatch "Srv") {
|
||||||
if ($CurrentBuild -ge 22000) {
|
if ($CurrentBuild -ge 22000) {
|
||||||
$Name = 'Win11'
|
$Name = 'Win11'
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$Name = 'Win10'
|
$Name = 'Win10'
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$Name = switch ($CurrentBuild) {
|
||||||
|
26100 { '2025' }
|
||||||
|
20348 { '2022' }
|
||||||
|
17763 { '2019' }
|
||||||
|
Default { $DisplayVersion }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WriteLog "Unloading registry"
|
WriteLog "Unloading registry"
|
||||||
Invoke-Process reg "unload HKLM\FFU"
|
Invoke-Process reg "unload HKLM\FFU"
|
||||||
|
|||||||
Reference in New Issue
Block a user