MSEndpointMgr / ModernBIOSManagement

MIT License
45 stars 22 forks source link

-BareMetal deployment on dell fails "This script is supported on Dell, Lenovo and HP systems only at this point, bailing out" #10

Open R4PH1 opened 3 years ago

R4PH1 commented 3 years ago

I only verified this on an OptiPlex 3010 until now. The script exits with the error in the log:

"This script is supported on Dell, Lenovo and HP systems only at this point, bailing out"

After some searching I found out the Log detects the following: Manufacturer: Dell Model: OptiPlex 3010 SystemSKU: FallbackSKU: 0585 (which seems to be correct)

The issue is in the handling of the FallbackSKU. It is detected in the Invoke-CMDownloadBiosPackage.ps1 on Linke 804 but nothing is happening with it.

As a quick workaround I added the following code into the function Get-BIOSUpdate (Line 1042)

Line 1054 - Line 1058

        # Set the SystemSKU if it is empty and a FallBackSKU is available. 
        if (([string]::IsNullOrEmpty($InputObject.SystemSKU)) -and (-not ([string]::IsNullOrEmpty($InputObject.FallBackSKU)))) {
       Write-CMLogEntry -Value "Computer SystemSKU is empty and FallBackSKU is set. Setting SystemSKU to FallBackSKU now to continue processing BareMetal deployment." -Severity 1
           $SystemSKU = $InputObject.FallBackSKU
    }

You could also add that in the processing of Get-ComputerData function or even modify the Get-BIOSUpdate function in line 1068
if (($ComputerModel -ne $null) -and (-not ([System.String]::IsNullOrEmpty($ComputerModel))) -or (($SystemSKU -ne $null) -and (-not ([System.String]::IsNullOrEmpty($SystemSKU))))) { to support the fallbackSKU

Either way please let me know what would be the best solution.