HP Dock Registry & Inventory with ConfigMgr

This is a follow up to my last post where I went over the WMI Provider to inventory Docks with Configuration Manager. There are a few docks that don’t have the WMI Provider. The HP Thunderbolt G2 Dock will create registry values when you run the Softpaq Firmware Updater, but the HP USB-C Dock G4 & HP USB-C G5 Essential Dock do not create Registry values either.

I purchased those docks on Ebay and have been testing a lot with them and have come up with a custom method for inventorying them based on a Function Dan Felman and I create a couple weeks ago.

Basically, you run this function (posted below) via ConfigMgr Baseline, Intune Proactive Remediation, Scheduled Task, manually, etc, and it will spit out information about the HP Dock you have connected to the device, if it happens to be one of the Non-WMI Provider Docks, it will create / append to the Registry some useful information.

Docks covered in this Post:

  • HP USB-C Dock G4
  • HP USB-C G5 Essential Dock
  • HP Thunderbolt Dock G2

Related Posts:

Overview

Deploy Script to Endpoints that will record HP Dock information. Import MOF files to CM and update Configuration.mof to inventory those registry values.

Function: garytown/Function_Get-HPDockUpdateDetails.ps1

In this post, I’ll be using a Task Sequence for deployment, not because you have to, but as an example of how you can then remove the reliance on internet access and keep the script and Firmware Softpaq files in your ConfigMgr infrastructure for “offline” management. But you sure could have it run as a baseline on a weekly / monthly basis, pulling the SoftPaq directly from HP (which is the default behavior).

Package Content:

My Source folder contains the Firmware for 6 HP Docks, so the Task Sequence can run on any of them. You can grab the URLs from the Function on GitHub.

Task Sequences

This Task Sequence only Detects and updates Registry Values, it will not update the Docks. You can deploy silently and have it run completely hidden to the end users.

The Task Sequence is 2 steps, one to Download the Dock Firmware Softpaq Files into the path variable HPDOCK, then the second step has the function, and calls the function with the -CMPackage & -Transcript parameters to let the function know to use the Softpaqs in the CCMCache in the HPDOCK variable location, and to create additional logs.

The Update Task Sequence is identical, other than one additional parameter is called (-update)

NOTE: Updating the dock will disrupt the end user, causing monitors to flicker and network to drop while the firmware is being updated. I recommend you allow this update to be Self-Service via software center, or run after hours in Maintenace window.

Manual Testing

NOTE: You can do testing with PowerShell as Admin using ISE, by grabbing the Function on GitHub, and running with the -Transcript parameter, then with the -Update parameter to confirm updates… it will pull the Updates from HP’s Servers during manual testing, give you some output and update the registry, then when you’re comfortable, move to the Task Sequence.

Registry after Detection

HP USB-C G5 Essential Dock

After the detection runs, you will have several items of information available, Available Update Version, Installed Firmware Version, and a status, along with MAC Address of the Dock.

NOTE ErrorCode 105 = Update Required

HP Thunderbolt Dock G2

The Thunderbolt Dock G2 will match the output as the USB-C G5 Essential Dock

HP USB-C Dock G4

This Dock does not have a way to determine the currently installed firmware, so at this point, we only know what version is available for the device and the MAC address. To determine the installed version, we have to actually run the Firmware Update, which will then update it to the current version, or skip updating if already at the current version. NOTE: If you have MAC Address passthrough enabled, which you probably do, the Dock MAC Address will actually be the HP Device’s System, and not help with the inventory of unique docks.

Registry after Upgrade

HP USB-C G5 Essential Dock

Firmware Updater Log: “C:\swsetup\dockfirmware\sp144502\HPFirmwareInstaller.log” – This will be the same directory as the HPFirmwareUpdater.exe

HP Thunderbolt Dock G2

After the update, several more values are showing. You might have different values for InstalledPackageVersion until detect is run again, however I don’t have additional docks to test on, and I’ve been unable to revert the firmware for additional testing.

Firmware Updater log: “C:\Windows\Temp\HPFirmwareInstaller.log” – Temp folder for the account running the Installer, in this case, SYSTEM

HP USB-C Dock G4

This dock didn’t actually require an update this time, as it was already on F.37.
I haven’t found where the dedicated log file is for this, but it does log everything to the smsts.log file:

CM Hardware Inventory MOF edits

You’ll need to update the configuration.mof file:
CM Install Dir \inboxes\clifiles.src\hinv
Contents: garytown/HPDocks.HWInvConfigurationMOF.txt

Then import this garytown/HPDocks.HWInvExt.mof to your Default Client Settings:

I then uncheck them, and check them in a custom client settings policy that I have deployed out to my HP Devices.

CM SQL Hardware Inventory

After Detection:

After Updates:

If you’re running into any issues with any of those 3 docks using my script and inventory process, please reach out to me via Twitter (@gwblok).

Thanks

GARYTOWN.COM

2 thoughts on “HP Dock Registry & Inventory with ConfigMgr”

  1. Hey Garytown.

    Interesting reads with the HP docks, thanks for your efforts in this.
    From my understanding of it all, because the Thunderbolt G2 docks don’t support WMI functions, there isn’t a way to query the Serial Number of the G2 dock?

    I notice that the Firmware updater places a serial number key in the Registry for the Gen 4 docks, but it doesn’t do the same for the Gen 2’s.

    Being able to read the Serial Number remotely is what I am after here.

    With Thanks

    Jeremy

    Reply
    • You are correct, there is no way to get the Serial Number via automated process on the G2 docks.
      If you wanted to annoy your end users, you could create a popup for them to find the serial and enter it, then you could tattoo it to the Registry or WMI and inventory it.

      This is one of those things (in a perfect world) that your asset management team would have added to inventory in their asset management system when it was purchased, and then assigned to a user / cube location. For the rest of us, at least the newest docks have the serial number available for inventory via automated processes.

      Reply

Leave a Comment

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