We're trying the v3.0.1 beta BIOS download script as we're seeing some weirdness with model detections for both HP and Dell and I wanted to see if this fixes it, and noticed that when multiple packages are returned for a HP (haven't checked other makes yet), the check at line 1151 doesn't work as the PackageList variable created is not an array, so does not have a count method. To fix this you need to wrap the whole command in @() as per the below code changes. This forces the returned value from this Select-Object -First 1 to be an array, so your check at line 1151 which uses .count works.
We're trying the v3.0.1 beta BIOS download script as we're seeing some weirdness with model detections for both HP and Dell and I wanted to see if this fixes it, and noticed that when multiple packages are returned for a HP (haven't checked other makes yet), the check at line 1151 doesn't work as the PackageList variable created is not an array, so does not have a count method. To fix this you need to wrap the whole command in @() as per the below code changes. This forces the returned value from this
Select-Object -First 1
to be an array, so your check at line 1151 which uses .count works.` if ($ComputerManufacturer -match "Dell") { $PackageList = @($PackageList | Sort-Object -Property SourceDate -Descending | Select-Object -First 1) } elseif ($ComputerManufacturer -eq "Lenovo") { $ComputerDescription = Get-WmiObject -Class Win32_ComputerSystemProduct | Select-Object -ExpandProperty Version
Attempt to find exact model match for Lenovo models which overlap model types
`