Type mismatch in Save-WebFile.ps1
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]
Does this happen using PowerShell 7 or Windows PowerShell? (5.1)
I'm getting the same error with driver and os downloads, seems to download fine. I'm on Powershell 7
@OSDeploy this issue is fixed in #326
This issue should be resolved as #326 was merged by @OSDeploy
@astavitsky can you verify on your end?
Confirmed working.