Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Public/Functions/Get-FeatureUpdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function Get-FeatureUpdate {
.NOTES
Author: David Segura - Recast Software
2026-07-16 - Updated comment-based help to match OSD standards
2026-10-02 - Added OSName values used by New-OSDCloudOSWimFile to ValidateSet
#>

[CmdletBinding()]
Expand All @@ -67,8 +68,14 @@ function Get-FeatureUpdate {
'Windows 11 24H2 arm64',
'Windows 11 24H2 x64',
'Windows 11 23H2 amd64',
'Windows 11 23H2 arm64',
'Windows 11 23H2 x64',
'Windows 11 22H2 amd64',
'Windows 11 22H2 x64',
'Windows 11 21H2 amd64',
'Windows 11 21H2 x64',
'Windows 10 22H2 amd64',
'Windows 10 22H2 arm64',
'Windows 10 22H2 x64'
)]
[Alias('Name')]
Expand Down
20 changes: 15 additions & 5 deletions Public/OSDCloudIPU/New-OSDCloudOSWimFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,33 @@ function New-OSDCloudOSWimFile {
}
#>

# Catalog entry names use amd64 instead of x64 (e.g. 'Windows 11 26H2 amd64 en-us Retail 26300.9457')
$OSNameFilter = $OSName -replace '(?i)\bx64$','amd64'

if ($OSName -match "ARM64"){
$OSArch = 'ARM64'
$OSDCloudOperatingSystem = (Get-OSDCloudOperatingSystems -OSArch ARM64) | Where-Object {$_.Name -match $OSName} | Where-Object {$_.Activation -eq $OSActivation} | Where-Object {$_.Language -eq $OSLanguage}
$OSDCloudOperatingSystem = (Get-OSDCloudOperatingSystems -OSArch ARM64) | Where-Object {$_.Name -match $OSNameFilter} | Where-Object {$_.Activation -eq $OSActivation} | Where-Object {$_.Language -eq $OSLanguage}
$IndexMap = Get-OSDCloudOperatingSystemsIndexMap -OSArch ARM64 | Where-Object {$_.Activation -eq $OSActivation} | Where-Object {$_.Language -eq $OSLanguage}
}
else {
$OSArch = 'x64'
$OSDCloudOperatingSystem = Get-OSDCloudOperatingSystems -OSArch x64 | Where-Object {$_.Name -match $OSName} | Where-Object {$_.Activation -eq $OSActivation} | Where-Object {$_.Language -eq $OSLanguage}
$OSDCloudOperatingSystem = Get-OSDCloudOperatingSystems -OSArch x64 | Where-Object {$_.Name -match $OSNameFilter} | Where-Object {$_.Activation -eq $OSActivation} | Where-Object {$_.Language -eq $OSLanguage}
$IndexMap = Get-OSDCloudOperatingSystemsIndexMap -OSArch x64 | Where-Object {$_.Activation -eq $OSActivation} | Where-Object {$_.Language -eq $OSLanguage}
}

$OSDCloudOperatingSystem = $OSDCloudOperatingSystem | Sort-Object -Property Build -Descending | Select-Object -First 1
$IndexMap = $IndexMap | Select-Object -First 1

if (-not $OSDCloudOperatingSystem){
Write-Host -ForegroundColor Red "Unable to find Operating System for $OSName $OSActivation $OSLanguage"
throw "Unable to find Operating System for $OSName $OSActivation $OSLanguage"
}

$OSEditionID = "$($OSDCloudOperatingSystem.Version) $OSEdition"
$OSImageIndex = $IndexMap.Indexes.$OSEditionID

if ($OSImageIndex -eq $null){
if ($null -eq $OSImageIndex){
Write-Host -ForegroundColor Red "Unable to determine OSImageIndex for Index $OSEdition"
Write-Host -ForegroundColor Yellow "Available Indexes are $($OSDCloudOperatingSystem.IndexNames.replace($(($OSDCloudOperatingSystem).Version),'') -join ', ')"
Write-Host -ForegroundColor Yellow "Available Indexes are $(@($IndexMap.IndexNames) -join ', ')"
throw "Unable to determine OSImageIndex for $OSName $OSEdition $OSActivation $OSLanguage"
}

Expand Down
Loading