Skip to content

Fix New-OSDCloudOSWimFile OS lookup failing for x64 targets - #392

Merged
OSDeploy merged 2 commits into
masterfrom
copilot/fix-new-osdcloudoswimfile-error
Oct 6, 2026
Merged

OSDeploy merged 2 commits into
masterfrom
copilot/fix-new-osdcloudoswimfile-error

Conversation

Copilot AI commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

New-OSDCloudOSWimFile fails with Unable to determine OSImageIndex and then You cannot call a method on a null-valued expression for x64 targets, the default included. The -OSName values use x64, but catalog Name values use amd64:

'Windows 11 26H2 amd64 en-us Retail 26300.9457' -match 'Windows 11 26H2 x64'   # False

When nothing matched, the error path called .replace() on IndexNames, a property OS records don't have.

New-OSDCloudOSWimFile

  • Normalizes -OSName before matching (x64 → amd64) and selects one record, the latest Build.
  • Throws Unable to find Operating System for … when no catalog record matches.
  • The "Available Indexes" message now reads IndexNames from the index map instead of the OS record.

Get-FeatureUpdate

  • Adds the remaining OSName values New-OSDCloudOSWimFile accepts (Windows 11 23H2 arm64, Windows 11 22H2/21H2 x64/amd64, Windows 10 22H2 arm64) to the -OSName ValidateSet. Previously those inputs failed parameter validation at the download step.

Known gap (not addressed)

  • Windows 10 targets still can't resolve an image index. CloudOperatingIndexMap.json only lists Windows 11 <Edition> keys. They now fail with a clear "Unable to determine OSImageIndex" message instead of the null-method error.

Co-authored-by: OSDeploy <12970006+OSDeploy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix New-OSDCloudOSWimFile error for downloading Wim Fix New-OSDCloudOSWimFile OS lookup failing for x64 targets Oct 2, 2026
Copilot AI requested a review from OSDeploy October 2, 2026 02:15
@OSDeploy
OSDeploy marked this pull request as ready for review October 6, 2026 06:09
Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:09
@OSDeploy
OSDeploy merged commit 0c180de into master Oct 6, 2026
@OSDeploy
OSDeploy deleted the copilot/fix-new-osdcloudoswimfile-error branch October 6, 2026 06:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The changes correctly address the reported lookup failure without introducing unresolved issues.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes x64 catalog lookup failures and aligns feature-update validation with supported OS targets.

Changes:

  • Normalizes x64 catalog searches to amd64 and selects the latest build.
  • Improves missing-OS and missing-index error handling.
  • Expands supported Get-FeatureUpdate OS names.
File Description
Public/​OSDCloudIPU/​New-OSDCloudOSWimFile.ps1 Corrects OS and index lookup behavior.
Public/​Functions/​Get-FeatureUpdate.ps1 Adds missing OS target values.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New-OSDCloudOSWimFile error trying to download Wim

3 participants