OSDCloud with HP Functions: Loading OSDCloudGUI – Part 2

In this post, lets take a looks at how OSDCloudGUI loads when running on an HP Enterprise machine. We’ll dig into the processes and see how it determines if a TPM or System Firmware update is needed.

Part 1OSDCloud with HP Functions – Part 1 – Michael the Admin
Part 2 – You are here
Part 3OSDCloud with HP Functions: Updating TPM and BIOS – Part 3 – Michael the Admin

Additional Information


When your OSDCloud WinPE image boots, the ‘Startnet.cmd’ file is ran. This step isn’t specifically related to the HP Functions, but it’s always good to know how things work>

This file located within the boot.wim of your ISO and will look something like below depending on your configuration.

File will be located in ‘<Drive>:\Windows\System32\startnet.cmd’

And will output this when ran:


View the whole function on Github

This function initializes the OSDCloud startnet environment by performing the following tasks:

  • Creates a log path if it does not already exist.
  • Copies OSDCloud config startup scripts to the mounted WinPE.
  • Initializes a splash screen if a SPLASH.JSON file is found in OSDCloud\Config.
  • Initializes hardware devices.
  • Initializes wireless network (optional).
  • Initializes network connections.
  • Updates PowerShell modules.


View the whole function on Github

This function performs the following tasks:

  • Get and export hardware information
    • To the CLI and to txt files in the LogPath
  • Open a minimized PowerShell window that run ‘ipconfig /all’
  • Open a minimized PowerShell windows that display drivers with Error’s
  • Display Manufacture, Model, and Serial Number Information
  • Display TPM Information


And in this specific setup, the startnet.cmd script will automatically run the Start-OSDCloudGUI function.

We’ll pick up here and dive into what happens in this function.


The ‘Start-OSDCloudGUI’ function doesn’t specifically do much for the HP Functions either, but the function sets up some important Variables and at the end, calls the ‘MainWindows.ps1’ to actually start loading the GUI.

View the whole function on Github

Some highlights of the functions:

  • Build the $Global:OSDCloudGUI variables
  • OSDCloud Automate
    • Export the current $Global:OSDCloudGUI variables to a json file
    • Import any Start-OSDCloudGUI.json files from the Automate folder
  • Set the Brand Name and Color
  • Determine a Driver Pack based on Device Product and OS Version
  • Check the TPM version to determine if Autopilot scenarios are supported.

And at the end of the script, the ‘OSDCloudGUI/MainWindow.ps1’ file is called.


The beginning of this script is setting up the Windows Form for the GUI and setting up some additional functions, but eventually we get to the ‘Manufacturer Enhancements Section.

View the whole script on Github

  1. We start by checking if the computer has an internet connection.
    • Test by checking ‘google.com’
    • This is required because if we don’t have internet, then we can’t utilize the HP Tools to check for TPM, BIOS, or other updates.
  2. If we are connected to the internet, then we build the function ‘Test-HPIASupport’
    • This function will download the ‘platformList.cab’ from HP and check if the computer is supported by HPIA.
    • If it is supported, then it returns a [bool]$true
  3. Get and store the Manufacture and Model
  4. Assuming we are running an HP computer
    • Test its HPIA Support and store it in $HPEnterprise
  1. Next we check the value of [bool]$HPEnterprise
    • and if true, we jump to ‘Install-ModuleHPCMSL’


This function installs the HP CMSL PS module from the PowerShell Gallery if not already installed.

View the whole function on Github

  1. Set the PS Module name ‘HPCMSL’
  2. Check if the Module is already installed
    • Then get the module from the PSGallery
  3. If the Module is already installed, check that it is at least the version in the PSGallery
  4. Whether we need an upgrade or install
    • Install the module for [AllUsers]
  5. And finally Import the module for use


Now lets determine if the TPM needs an update

View the whole function on Github

  1. First lets determine which update package is required based on the Reported Manufacture information.
  2. This is a manual check for a downgraded scenario.
  3. If an upgraded is needed, Return the Softpaq version
    • else return [bool]$false as no updated is needed.


Next up is checking for any System Firmware (BIOS) Updates.

For this, the ‘Get-HPBIOSUpdates’ function from the HP CMSL module will be used. Information on the function can be found on the HP Developers Portal.

At this point we only want to know if there is a Newer version compared to the Installed version of the System Firmware.

So we will use the ‘-Check’ switch. This will return [bool]$true or [bool]$false depending on the installed version.

MainWindow.ps1 – Continued

Back in the MainWindow.ps1 script, we’ll finish this section up by editing the Manufacture Control Options.

  1. Set the control Header text and make it visible
  2. Add the HPIA options to the Control Options.
    • Set the ‘IsChecked’ property based on the values from $Global:OSDCloudGUI
  3. Add the TPM Update Control Option
    • Text will depend on if an update is needed and which updated should be applied
  4. Add the System Firmware Control Option. There are 4 options here
    • BIOS is at latest version
    • BIOS Update is available
      • Utilizes the ‘Get-HPBIOSUpdates’ function with the ‘-Latest’ switch to get the latest available BIOS Update version.
      • Utilizes the ‘Get-HPBIOSVersion’ function to get the currently installed BIOS version
      • Then adds both values to the Control Option text.
    • Error determining if an Update is needed during the ‘Get-HPBIOSUpdates’ function
    • Error determining BIOS Information
  5. And lastly we make sure either ‘HPIA All’ is the only HPIA option selected, or if any of the individual options, then we unselect ‘HPIA All’

After setting up the Manufacture Control Options, the last thing that will happen will be to save the selected option within the GUI to the $Global.InvokeOSDCloud variable

  1. First the Variable is created
  2. Then if an HP Enterprise devices is being used, we get the ‘IsChecked’ property values and store them in $Global:InvokeOSDCloud

These values will be loaded once the ‘Invoke-OSDCloud’ function is called just a little further down.

Giving it a try

If we run Start-OSDCloudGUI on an HP Prodesk 600 G5 SFF with an outdated BIOS and TPM chip on 1.2 firmware

We get the option to Upgrade the BIOS

  • System Firmware (BIOS)
    • Current Version: 02.14.01
    • Latest Version: 02.20.00

And we get the option to Upgrade the TPM using package SP94937

SP94937 – Release Notes

  • TPM
    • Current Version: 6.43
    • Latest Version: 7.85


As you can see there is a lot going on just to load the Windows Form of OSDCloudGUI.

Next time we’ll take a look at the actual update process for these two components.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top