mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 10:19:36 -06:00
Update CaptureFFU.ps1
- Add support for Server Core in SKU name
This commit is contained in:
@@ -12,6 +12,7 @@ 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'
|
||||
$InstallationType = Get-ItemPropertyValue -Path 'HKLM:\FFU\Microsoft\Windows NT\CurrentVersion\' -Name 'InstallationType'
|
||||
$BuildDate = Get-Date -uformat %b%Y
|
||||
|
||||
$SKU = switch ($SKU) {
|
||||
@@ -32,7 +33,7 @@ $SKU = switch ($SKU) {
|
||||
ServerDatacenter { 'Srv_Dtc' }
|
||||
}
|
||||
|
||||
if ($SKU -notmatch "Srv") {
|
||||
if ($InstallationType -eq "Client") {
|
||||
if ($CurrentBuild -ge 22000) {
|
||||
$Name = 'Win11'
|
||||
}
|
||||
@@ -46,6 +47,9 @@ if ($SKU -notmatch "Srv") {
|
||||
17763 { '2019' }
|
||||
Default { $DisplayVersion }
|
||||
}
|
||||
if ($InstallationType -eq "Server Core") {
|
||||
$SKU += "_Core"
|
||||
}
|
||||
}
|
||||
|
||||
#If Office is installed, modify the file name of the FFU
|
||||
|
||||
Reference in New Issue
Block a user