Merge pull request #54 from w0/main

use ValidateSet for WindowsSKU
This commit is contained in:
rbalsleyMSFT
2024-08-15 18:59:01 -07:00
committed by GitHub
+1 -5
View File
@@ -198,11 +198,7 @@ param(
[Parameter(Mandatory = $false, Position = 0)] [Parameter(Mandatory = $false, Position = 0)]
[ValidateScript({ Test-Path $_ })] [ValidateScript({ Test-Path $_ })]
[string]$ISOPath, [string]$ISOPath,
[ValidateScript({ [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')]
$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')
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,