Get-DellWinPEDriverPack: LastKnownGood fallback is always empty (key name mismatch), so Edit-OSDCloudWinPE -CloudDriver * crashes

Đang mở Phù hợp với người mới
#401 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
powershell
Lĩnh vực
devtools

Hướng nghiên cứu

Đọc Public/OEM/Get-DellWinPEDriverPack.ps1 quanh dòng 55 và kiểm tra các khóa Dell trong OSD.json; issue xác định khóa không khớp và đưa ra cách tái hiện khi trang Dell không khả dụng. Chạy cách tái hiện, sau đó xác minh rằng fallback trả về URL LastKnownGoodWin11 đã cấu hình và Edit-OSDCloudWinPE -CloudDriver '*' có thể tiếp tục khi trang Dell không khả dụng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the bug
Get-DellWinPEDriverPack falls back to $Global:OSDModuleResource.WinPEDriverPack.Dell.LastKnownGood11 (Public/OEM/Get-DellWinPEDriverPack.ps1, line 55). But OSD.json defines that key as LastKnownGoodWin11, so the fallback is always $null.

dell.com regularly refuses the scripted request to the kbdoc page; in our tests, 2 out of 3 attempts failed. The function then returns nothing, and Save-WinPECloudDriver passes $null to Test-WebConnection (line 213), which throws. As a result, Edit-OSDCloudWinPE -CloudDriver * fails intermittently and leaves boot.wim mounted.

To Reproduce

  1. Simulate dell.com refusing the request:
    Import-Module OSD
    $Global:OSDModuleResource.WinPEDriverPack.Dell.Info = 'https://does-not-exist.invalid/'
    Get-DellWinPEDriverPack
    
  2. Output: WARNING: DriverPack LastKnownGood Offline: with an empty URL, and the function returns nothing.
  3. Check the key names:
    $Global:OSDModuleResource.WinPEDriverPack.Dell.Keys
    # LastKnownGoodWin11, LastKnownGoodWin10, Info - no LastKnownGood11
    
  4. In a real build, Edit-OSDCloudWinPE -WorkspacePath C:\OSDCloud -CloudDriver '*' fails whenever dell.com refuses the request:
    WARNING: DriverPack Info Offline: https://www.dell.com/support/kbdoc/en-us/000107478/dell-command-deploy-winpe-driver-packs
    WARNING: DriverPack LastKnownGood Offline:
    [..] Dell WinPE Driver Pack
    Test-WebConnection : Exception calling ".ctor" with "1" argument(s): "Invalid URI: The hostname could not be parsed."
    At C:\Program Files\WindowsPowerShell\Modules\OSD\26.10.16.1\Public\Functions\Save-WinPECloudDriver.ps1:213 char:17
    +             if (Test-WebConnection -Uri $DellCloudDriverPack) {
    

Expected behavior
When dell.com doesn't answer, Get-DellWinPEDriverPack returns the LastKnownGoodWin11 URL from OSD.json, which is reachable. Edit-OSDCloudWinPE continues with that driver pack. If no URL is available at all, Save-WinPECloudDriver should skip the Dell pack with a warning instead of throwing.

Suggested fix: in Get-DellWinPEDriverPack.ps1 line 55, read LastKnownGoodWin11 instead of LastKnownGood11. Optionally, guard against an empty $DellCloudDriverPack in Save-WinPECloudDriver.ps1.

Screenshots
N/A (the console output is above).

Desktop (please complete the following information):

  • OS: Windows 11 25H2 (build PC), Windows PowerShell 5.1
  • Browser: N/A
  • Version: OSD 26.10.16.1. Also present on the current master branch.

Additional context
Workaround until this is fixed: before calling Edit-OSDCloudWinPE, set the key the function reads:

$Global:OSDModuleResource.WinPEDriverPack.Dell['LastKnownGood11'] = $Global:OSDModuleResource.WinPEDriverPack.Dell.LastKnownGoodWin11
Ngôn ngữ chính
PowerShell
Star
251
Fork
102
Merge trung bình
2 phút
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OSDeploy/OSD

Tất cả issue của OSDeploy/OSD

Issue tương tự

Thêm issue về DevTools

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.