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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mstraessner
Copy link

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
Copy link

ddobert commented Feb 5, 2021

nice!

@m0nkiwitacaus
Copy link

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
Copy link

JEngel05 commented Mar 12, 2021

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

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
Copy link

Stensdal commented Apr 28, 2021

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

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.

5 participants