Update BuildFFUVM.ps1

- Add script parameters to allow Windows Server image creation
This commit is contained in:
JonasKloseBW
2024-09-23 03:41:40 +02:00
committed by GitHub
parent 47cd0deb03
commit e3cbcab6b2
+6 -2
View File
@@ -201,7 +201,11 @@ param(
[Parameter(Mandatory = $false, Position = 0)] [Parameter(Mandatory = $false, Position = 0)]
[ValidateScript({ Test-Path $_ })] [ValidateScript({ Test-Path $_ })]
[string]$ISOPath, [string]$ISOPath,
[ValidateSet('Home', 'Home N', 'Home Single Language', 'Education', 'Education N', 'Pro', 'Pro N', 'Pro Education', 'Pro Education N', 'Pro for Workstations', 'Pro N for Workstations', 'Enterprise', 'Enterprise N')] [ValidateScript({
$allowedSKUs = @('Home', 'Home N', 'Home Single Language', 'Education', 'Education N', 'Pro', 'Pro N', 'Pro Education', 'Pro Education N', 'Pro for Workstations', 'Pro N for Workstations', 'Enterprise', 'Enterprise N', 'Standard', 'Standard (Desktop Experience)', 'Datacenter', 'Datacenter (Desktop Experience)')
if ($allowedSKUs -contains $_) { $true } else { throw "Invalid WindowsSKU value. Allowed values: $($allowedSKUs -join ', ')" }
return $true
})]
[string]$WindowsSKU = 'Pro', [string]$WindowsSKU = 'Pro',
[ValidateScript({ Test-Path $_ })] [ValidateScript({ Test-Path $_ })]
[string]$FFUDevelopmentPath = $PSScriptRoot, [string]$FFUDevelopmentPath = $PSScriptRoot,
@@ -267,7 +271,7 @@ param(
[string]$ProductKey, [string]$ProductKey,
[bool]$BuildUSBDrive, [bool]$BuildUSBDrive,
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
[ValidateSet(10, 11)] [ValidateSet(10, 11, 2016, 2019, 2022, 2025)]
[int]$WindowsRelease = 11, [int]$WindowsRelease = 11,
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
[string]$WindowsVersion = '23h2', [string]$WindowsVersion = '23h2',