From f144f1d71c64f4a4561548202f1750120df3c7aa Mon Sep 17 00:00:00 2001 From: JonasKloseBW Date: Mon, 30 Sep 2024 16:52:15 +0200 Subject: [PATCH] Update CaptureFFU.ps1 - Add support for Server Core in SKU name --- FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 b/FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 index 8a5cee8..81a7907 100644 --- a/FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 +++ b/FFUDevelopment/WinPECaptureFFUFiles/CaptureFFU.ps1 @@ -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