How to extend BiosUpdateTemplate package script
Table of Contents
Entry point of Install.ps1 is the function Main. There you can see a call of function Update Bios with manufacturer, model, and BIOS version of the current system as arguments. Within that function other manufacturer can be added as a case for the switch.
switch($systemManufacturer.ToUpper())
{
"DELL INC."
{
$exitCode = UpdateDellBios $systemModel $biosVersion;
}
}Here you can extend with another manufacturer. You also need a dedicated update function for the new manufacturer. Here we use a new Update Lenovo Bios function.
switch($systemManufacturer.ToUpper())
{
"DELL INC."
{
$exitCode = UpdateDellBios $systemModel $biosVersion;
}
"LENOVO"
{
$exitCode = UpdateLenovoBios $systemModel $biosVersion;
}
}Check of exit codes must be extended or modified according to documentation of manufacturer's BIOS update or flash utility.
For Dell this can be found here: https://www.dell.com/support/home/en-us/drivers/driversdetails?driverid=0r8cx
Our new Update Lenovo Bios function could look like the existing Update Dell Bios function and have models of the manufacturer listed and call a method to update a device with that model. Here Update Lenovo20BW function, which we call with the BIOS version of current system.
switch($systemModel.ToUpper())
{
"20BW"
{
$exitCode = UpdateLenovo20BW $biosVersion;
}
}Once we have the Update Lenovo Bios function we create also a new Update Lenovo20BW function where we cover all required BIOS versions of available clients. And create a function which will flash device with new BIOS executable.
switch($biosVersion.ToUpper())
{
"JBET67WW"
{
$exitCode = UpdateLenovo20BWToJBET67WW;
}
default
{
$exitCode = UpdateLenovo20BWToJBET67WW;
}
}In such a function Update Lenovo20BWTo JBET67WW we need a flash function for out new manufacturer which will look like existing Flash Dell Device function. New Flash Lenovo Device function would use the BIOS flash utility from website of this manufacturer with required parameters or execute BIOS update executable directly which can run on Win PE.
$exit Code = Flash Lenovo Device "WINUPTP64.exe";A BIOS password might be required for updates
The Matrix42 Pre OS Package Bios Update Template comes with a package variable Bios Password. This can be set at the Matrix42 Management Console.
Open the Matrix42 Management Console and navigate to Management > Administration.
Select the Configuration Group that contains the Computer and open the variable dialog via the context menu.

The variable dialog shows a User defined variable Bios Update Template that contains the subordinated variable Bios Password. Select the Bios Update Template variable and press Edit to show the variable Bios Password. Select this variable again an Edit to change the value of the Bios Password variable.

Where to store BIOS flash utility and BIOS update executables
Within Bios Update Template package update executables and flash utilities can be placed in the Bios Update Executables-folder right under version-folder nearby to Install-folder.

In this template some executables from Dell are used.

It might be more efficient to create subfolders for each manufacturer there.
Function Flash Dell Device in this Bios Update Template package demonstrates how to navigate to this folder and execute flash utility with update executables as argument.