You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a logic issue when multiple BIOS are matched using the SKU matching. For example, the BIOS for HP 830 G7, 840 G7 and HP Zbook Firefly 14 G7 are all the same SKU (8723) but we have imported all of them.
So, when installing any of those models, the script detects three "different" BIOS packages and does not know which one to select. Screenshot
UPDATE: OK, did a little digging and I know the problem. You need to strongly type $PackageList as [array] when you detect multiple package. Otherwise when you use Select-Object -First 1, it does NOT return an array and the Count property is missing.
Thanks Ginolard.
I can confirm this on Lenovo. There are several occurrences of the "$PackageList = $PackageList | *" lines where there must be added "[array]" in the beginning.
I can confirm, but I i think the problem is the IF-Statement in line 1125: if ($PackageList.Count -ge 1) {
becaue of th "-ge" it will not use the Elseif ($PackageList.Count -ge 2) from line 1164
I changed the line 1125 to if ($PackageList.Count -eq 1) {
and then it worked like a charm
There seems to be a logic issue when multiple BIOS are matched using the SKU matching. For example, the BIOS for HP 830 G7, 840 G7 and HP Zbook Firefly 14 G7 are all the same SKU (8723) but we have imported all of them.
So, when installing any of those models, the script detects three "different" BIOS packages and does not know which one to select.
Screenshot
UPDATE: OK, did a little digging and I know the problem. You need to strongly type $PackageList as [array] when you detect multiple package. Otherwise when you use Select-Object -First 1, it does NOT return an array and the Count property is missing.
Explanation here
So, in lines 1124-1185 you should change every
$PackageList = $PackageList | Sort-object -Property SourceDate -Descending | Select-Object -First 1
to
[array]$PackageList = $PackageList | Sort-object -Property SourceDate -Descending | Select-Object -First 1
Additionally, as mentioned in another post you need to sort on SourceDate and not PackageCreated.
The text was updated successfully, but these errors were encountered: