From 030c8a25493f70666138d546809105ab32e8a520 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 2 Oct 2026 02:09:24 +0000 Subject: [PATCH 1/2] Initial plan From 3c5d33e58fb16cac1da7b16bb19def6fd69dd92e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 2 Oct 2026 02:14:34 +0000 Subject: [PATCH 2/2] Fix New-OSDCloudOSWimFile OS lookup for x64 catalog names (amd64) Co-authored-by: OSDeploy <12970006+OSDeploy@users.noreply.github.com> --- Public/Functions/Get-FeatureUpdate.ps1 | 7 +++++++ Public/OSDCloudIPU/New-OSDCloudOSWimFile.ps1 | 20 +++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Public/Functions/Get-FeatureUpdate.ps1 b/Public/Functions/Get-FeatureUpdate.ps1 index 11854860..ec2b24c8 100644 --- a/Public/Functions/Get-FeatureUpdate.ps1 +++ b/Public/Functions/Get-FeatureUpdate.ps1 @@ -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()] @@ -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')] diff --git a/Public/OSDCloudIPU/New-OSDCloudOSWimFile.ps1 b/Public/OSDCloudIPU/New-OSDCloudOSWimFile.ps1 index f8aace9f..d5a07592 100644 --- a/Public/OSDCloudIPU/New-OSDCloudOSWimFile.ps1 +++ b/Public/OSDCloudIPU/New-OSDCloudOSWimFile.ps1 @@ -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" }