Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to determine a matching BIOS package from list since an unsupported count was returned from package list #7

Open
Ginolard opened this issue Mar 25, 2021 · 2 comments

Comments

@Ginolard
Copy link

Ginolard commented Mar 25, 2021

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.

@Jabbaxx
Copy link

Jabbaxx commented Jun 7, 2021

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.

@NorbertBauer
Copy link

Thanks

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants