Skip to content

Wrong version comparison in Get-MyDellBios.ps1 #332

@mdmplayground

Description

@mdmplayground

Describe the bug
The function "Update-MyDellBios" will never update an bios if "-Force" is not set.
The reason is a wrong version comparison where the Dell Catalog Version needs to be lower than the systems current bios version.
if (($GetMyDellBios.DellVersion -lt (Get-MyBiosVersion)) -or ($Force.IsPresent) ) { ... }

Affected Script:
Public/Functions/BIOS/Get-MyDellBios.ps1

To Reproduce
Add "Update-MyDellBios" as shutdown script without -force parameter.

Expected behavior
The bios will be updated from a lower to a higher version without the -force parameter

Recommended solution:
if ( ((Get-MyBiosVersion) -lt $GetMyDellBios.DellVersion) -or ($Force.IsPresent) ) { ... }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions