mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
- Added server skus to validateset for $WindowsSKU
- Added new variable $installationType which uses $WindowsRelease to determine Server or Client. If $installationType is Server, $WindowsRelease version is used to set $WindowsVersion to the appropriate version (1607, 1809, 21H2) - Fixed an issue where the recovery partition wouldn't be created on server OSes due to winre.wim being hidden. Never saw this on client OSes even though it also was hidden IIRC. - Removed verbosity for Optimize-Volume as it was outputting when -verbose was not specified. - Modified some search strings for .NET CUs when installing on Server OS - Included SSU for Windows Server 2016 as it's mandatory - Added some error checking for Server 2019 and 2022 CU installations when CU fails due to lack of SSU. If you run into this error, you're using old media and should use the latest. Always use the latest ISO if you can.
This commit is contained in:
@@ -11,22 +11,24 @@ reg load "HKLM\FFU" $Software
|
||||
|
||||
$SKU = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'EditionID'
|
||||
[int]$CurrentBuild = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'CurrentBuild'
|
||||
$DisplayVersion = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'DisplayVersion'
|
||||
if ($CurrentBuild -notin 14393, 17763) {
|
||||
$DisplayVersion = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'DisplayVersion'
|
||||
}
|
||||
$InstallationType = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'InstallationType'
|
||||
$BuildDate = Get-Date -uformat %b%Y
|
||||
|
||||
$SKU = switch ($SKU) {
|
||||
Core { 'Home' }
|
||||
CoreN { 'HomeN'}
|
||||
CoreSingleLanguage { 'HomeSL'}
|
||||
CoreN { 'HomeN' }
|
||||
CoreSingleLanguage { 'HomeSL' }
|
||||
Professional { 'Pro' }
|
||||
ProfessionalN { 'ProN'}
|
||||
ProfessionalN { 'ProN' }
|
||||
ProfessionalEducation { 'Pro_Edu' }
|
||||
ProfessionalEducationN { 'Pro_EduN' }
|
||||
Enterprise { 'Ent' }
|
||||
EnterpriseN { 'EntN'}
|
||||
EnterpriseN { 'EntN' }
|
||||
Education { 'Edu' }
|
||||
EducationN { 'EduN'}
|
||||
EducationN { 'EduN' }
|
||||
ProfessionalWorkstation { 'Pro_Wks' }
|
||||
ProfessionalWorkstationN { 'Pro_WksN' }
|
||||
ServerStandard { 'Srv_Std' }
|
||||
@@ -40,11 +42,13 @@ if ($InstallationType -eq "Client") {
|
||||
else {
|
||||
$Name = 'Win10'
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$Name = switch ($CurrentBuild) {
|
||||
26100 { '2025' }
|
||||
20348 { '2022' }
|
||||
17763 { '2019' }
|
||||
14393 { '2016' }
|
||||
Default { $DisplayVersion }
|
||||
}
|
||||
if ($InstallationType -eq "Server Core") {
|
||||
@@ -70,8 +74,10 @@ else{
|
||||
#Unload Registry
|
||||
Set-Location X:\
|
||||
Remove-Variable SKU
|
||||
if ($CurrentBuild -notin 14393, 17763) {
|
||||
Remove-Variable DisplayVersion
|
||||
}
|
||||
Remove-Variable CurrentBuild
|
||||
Remove-Variable DisplayVersion
|
||||
Remove-Variable Office
|
||||
reg unload "HKLM\FFU"
|
||||
#This prevents Critical Process Died errors you can have during deployment of the FFU - may not happen during capture from WinPE, but adding here to be consistent with VHDX capture
|
||||
|
||||
Reference in New Issue
Block a user