Skip to content

Update Invoke-CMDownloadBIOSPackage: Script 'bails out' when multiple packages are added to the BIOS package list - #4

Open
mstraessner wants to merge 1 commit into
MSEndpointMgr:mainfrom
mstraessner:patch-1
Open

mstraessner wants to merge 1 commit into
MSEndpointMgr:mainfrom
mstraessner:patch-1

Conversation

@mstraessner

Copy link
Copy Markdown

Troubleshooting: device has some UEFI updates, but none is selected instead of the last update. It's a casting error at selection by all lines with: $PackageList = $PackageList | Sort-Object -Property SourceDate -Descending | Select-Object -First 1

Solution: Create an array object and not a PSCustom object, so that the method count is present.

Troubleshooting: device has some UEFI updates, but none is selected instead of the last update. It's a casting error at selection by all lines with: $PackageList = $PackageList | Sort-Object -Property SourceDate -Descending | Select-Object -First 1

Solution: Create an array object and not a PSCustom object, so that the method count is present.
@mstraessner mstraessner changed the title Update Invoke-CMDownloadBIOSPackage.ps1 Update Invoke-CMDownloadBIOSPackage: Script 'bails out' when multiple packages are added to the BIOS package list Feb 4, 2021
@ddobert

ddobert commented Feb 5, 2021

Copy link
Copy Markdown

nice!

@m0nkiwitacaus

Copy link
Copy Markdown

Writing to confirm this to be working on HP systems. Will verify with Dell's later on, but we have no Microsoft or Lenovo computers in our environment.

@JEngel05

JEngel05 commented Mar 12, 2021

Copy link
Copy Markdown

Doesn't seem to fix Lenovo.
The last few lines of the apply-bios log are:
BIOS package list contains multiple matches, attempting to set task sequence variable
BIOS detection process failed, please refer to previous error or warning messages.

Powershell transcription logs show it failing on:
(Get-BIOSUpdate): "You cannot call a method on a null-valued expression"

@m0nkiwitacaus

Copy link
Copy Markdown

Writing back to confirm that no issues on Dell either. Can't speak to the Lenovo problem JEngel05 was having, and we're not currently using Surfaces.

@Stensdal

Stensdal commented Apr 28, 2021

Copy link
Copy Markdown

I was also having problems with Lenovo computers, even with this fix.
But found the problem in the line that call the Compare-BIOSversion function for Lenovo (line 1193), there is not a value "PackageDescription" it's just "Description".
It must be changed together with the changes in this request.

Compare-BIOSVersion -AvailableBIOSVersion $PackageList[0].Version -AvailableBIOSReleaseDate $(($PackageList[0].PackageDescription).Split(":")[2]).Trimend(")") -ComputerManufacturer $ComputerManufacturer

Should be changed to:
Compare-BIOSVersion -AvailableBIOSVersion $PackageList[0].Version -AvailableBIOSReleaseDate $(($PackageList[0].Description).Split(":")[2]).Trimend(")") -ComputerManufacturer $ComputerManufacturer

@vartaxe

vartaxe commented Sep 7, 2026

Copy link
Copy Markdown

I think this was fixed already

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

Successfully merging this pull request may close these issues.

6 participants