Skip to content

Type mismatch in Save-WebFile.ps1 #325

@astavitsky

Description

@astavitsky

Describe the bug
Downloading driver packs whether for WinPE or offline USB produces the error:

InvalidOperation: C:\Program Files\PowerShell\Modules\OSD\25.10.22.2\Public\Functions\Other\Save-WebFile.ps1:145
Line |
 145 |                  $localExists `
     |                  ~~~~~~~~~~~~~~
     | Could not compare "978731008" to "978731008". Error: "Cannot convert the "System.String[]" value of type
     | "System.String[]" to type "System.Int64"."
InvalidOperation: C:\Program Files\PowerShell\Modules\OSD\25.10.22.2\Public\Functions\Other\Save-WebFile.ps1:165
Line |
 165 |  …         if ($localExists -and ((Get-Item $DestinationFullName).Length …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Could not compare "978731008" to "978731008". Error: "Cannot convert the "System.String[]" value of type
     | "System.String[]" to type "System.Int64"."

It appears that the driver packs were downloaded successfully despite the error above.

To Reproduce
Update-OSDCloud -DriverPack Microsoft

Expected behavior
No errors are produced

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows 11 24H2
  • Browser [e.g. chrome, safari]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions