mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Update BuildFFUVM.ps1
- Update Get-Index to support processing Windows Server images
This commit is contained in:
@@ -2600,8 +2600,13 @@ function Get-Index {
|
|||||||
|
|
||||||
# Get the ImageName of ImageIndex 1 if an ISO was specified, else use ImageIndex 4 - this is usually Home or Education SKU on ESD MCT media
|
# Get the ImageName of ImageIndex 1 if an ISO was specified, else use ImageIndex 4 - this is usually Home or Education SKU on ESD MCT media
|
||||||
if($ISOPath){
|
if($ISOPath){
|
||||||
$imageIndex = $imageIndexes | Where-Object ImageIndex -eq 1
|
if ($WindowsSKU -notmatch "Standard|Datacenter") {
|
||||||
$WindowsImage = $imageIndex.ImageName.Substring(0, 10)
|
$imageIndex = $imageIndexes | Where-Object ImageIndex -eq 1
|
||||||
|
$WindowsImage = $imageIndex.ImageName.Substring(0, 10)
|
||||||
|
} else {
|
||||||
|
$imageIndex = $imageIndexes | Where-Object ImageIndex -eq 1
|
||||||
|
$WindowsImage = $imageIndex.ImageName.Substring(0, 19)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$imageIndex = $imageIndexes | Where-Object ImageIndex -eq 4
|
$imageIndex = $imageIndexes | Where-Object ImageIndex -eq 4
|
||||||
@@ -2619,8 +2624,8 @@ function Get-Index {
|
|||||||
return $matchingImageIndex.ImageIndex
|
return $matchingImageIndex.ImageIndex
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Look for either the number 10 or 11 in the ImageName
|
# Look for the numbers 10, 11, 2016, 2019, 2022+ in the ImageName
|
||||||
$relevantImageIndexes = $imageIndexes | Where-Object { ($_.ImageName -like "*10*") -or ($_.ImageName -like "*11*") }
|
$relevantImageIndexes = $imageIndexes | Where-Object { ($_.ImageName -match "(10|11|2016|2019|202\d)") }
|
||||||
|
|
||||||
while ($true) {
|
while ($true) {
|
||||||
# Present list of ImageNames to the end user if no matching ImageIndex is found
|
# Present list of ImageNames to the end user if no matching ImageIndex is found
|
||||||
|
|||||||
Reference in New Issue
Block a user