mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
use ValidateSet for WindowsSKU
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user