Driver injection with HP Image Assistant and HP CMSL in MEM CM (upd. 4/27/2021)

HP Image Assistant (since version 4.5.4) and the HP Client Management Script Library (since version 1.4.0) can team up to deliver intelligent and efficient installation of HP drivers, bios, and other HP software in a Microsoft Endpoint Management Configuration Manager (MEMCM), or other similar management environments. Recently added features support the ability for the CMSL to create and maintain offline, intranet hosted respositories. HPIA can then utilize these repositories during image deployment tasks or for normal driver updates, potentially eliminating the need to install driverpacks, or as a supplement to make sure any drivers installed during driverpack injection are up to date during the imaging steps. Other Management tools can also use the information in this blog to automate similar processes.

Previously, HP System Software Manager (SSM) has had this role for quite some time but required additional effort in managing the Softpaq store and over time could become confused as to which Softpaq made sense to install as the file store grew in size and number of softpaqs. The HP CMSL can clean up the repository so that only the latest release of any Softpaq (bios, driver, software, etc.) is available and ready.

This blog shows how to create and maintain a Softpaq repository, a step-by-step outline for Microsoft MEMCM to use it for client installations or updates, and download from a MEMCM Distribution point, instead of from HP.

Thanks, Quick/HP, Nathan/HP, and Val/HP, for your help checking out the process, finding my oversights, and helping clear the documentation.

Adding the CMSL to PowerShell

NOTE: Obtaining the CMSL from the Microsoft PowerShell gallery requires the use of the PowerShellGet module. If it needs installed, you can follow these steps to set it up (in PowerShell as Administrator):

PS > Install-PackageProvider -Name NuGet -Force # make sure Package NuGet is up to date 
PS > Install-Module -Name PowerShellGet  -Force # install the latest version of PowerSHellGet module

Exit your PowerShell command window and open a new one, also as Administrator - This seems to be a crtitical step, or you will see errors loading the HPCMSL module

The CMSL can be installed directly into PowerShell from the PowerShell Gallery (as the preferred method) with the PowerShellGet cmdlet:

PS> Install-Module -Name HPCMSL

Documentation for the CMSL is hosted here.

Creating a Repository

For this exercise, let’s assume the MEMCM server is named CM01, the MEMCM share to be used by the clients is set to \\CM01\share, and the downloaded and unpacked HP Image Assistant folder is at \\CM01\share\HPIA. We will keep the Softpaq repository as a separate place on the share so that only the needed Softpaqs are downloaded to the client device. The following commands will do what we need. As long as the client can access the HPIA folder and HPIA can access (read/write permission) the repository share, they can be hosted anywhere.

Note: Some of the following PowerShell command require that they be executed from the repository folder we create, as they cannot be pointed to a specific repository with a runtime option. Again, for this exercise, we will configure this folder as the repository: \\cm01\share\softpaq\repository

  1. In PowerShell, create and Initialize a repository. The CMSL commands will be running 'from' the repo share.
PS> MD \\CM01\share\Softpaqs\Repository
PS> CD \\CM01\share\Softpaqs\Repository
PS \\cm01\share\softpaqs\repository> Initialize-Repository         # do once
  1. Critical step, and required by HP Image Assistant – done once
PS \\cm01\share\softpaqs\repository> Set-RepositoryConfiguration -setting OfflineCacheMode -Cachevalue Enable  # do once
  1. Develop filters to let the library figure out what to download.

        For the current version of the HP CMSL (1.4.3), the category value must be one of [bios,firmware,driver,software,os,manageability,diagnostic,utility,driverpack,dock]. To use multiple values, separate filter value with a ‘,’.  HP CMSL commands will take parameter values as strings with or without quoting.

         Again, these commands need to be executed from the repository folder, as they currently do not have a way to specify a repository. They expect to be in the current folder. In the example, -platform ‘83b2’ = HP EliteBook 840 G5, and ‘8549’ = HP EliteBook 840 G6.

PS \\cm01\share\softpaqs\repository> Add-RepositoryFilter -os ‘win10’ -osver ‘1909’ -platform ‘83b2’ -category driver,bios
PS \\cm01\share\softpaqs\repository> Add-RepositoryFilter -os ‘win10’ -osver ‘1909’ -platform ‘8549’ -category driver
PS ...	add filters as required for the systems to be managed
  1. Sync and remove/clean-up superseded Softpaqs from the Repository (run command from the repository folder)
PS \\cm01\share\softpaqs\repository> Invoke-RepositorySync
PS \\cm01\share\softpaqs\repository> Invoke-RepositoryCleanup

Step 4 should be repeated on a regular basis, perhaps weekly to maintain the catalog. A PowerShell script with both commands can be used and run on a schedule. Make sure they are called from the Repository folder.

NOTE: if the Invoke-RepositorySync command fails to sync, the HP Image Assistant execution will also fail to install. Make sure there are no errors with the Step 4 commands

HP Image Assistant

HP Image Assistant (HPIA) can be downloaded from the HP Client Management Download Library home page: Client Management Solutions - HP Downloads | HP® Official Site. Downloading and executing the Softpaq will unpack at: C:\SWSETUP\sp101503 (the current 4.5.4 software version), Because HPIA was designed to not require installation, the folder can be copied to another location and run from there, even from a USB key.

We will be copying/moving the complete extracted HP IA folder to our share. For example, using Windows XCOPY from a CMD line:

C:> XCOPY C:\SWSETUP\sp101503\*.* \\CM01\share\HPIA\ /e

Or from a PowerShell window:

PS> copy-item -path c:\swsetup\sp101503\ -destination \\cm01\share\HPIA -recurse

When a new version of HP Image Assistant is available, all that is needed is to download, extract and copy the contents of the unpacked folder to the share, and update the MEMCM distribution Points.

For our purpose, HP Image Assistant will be used in an offline mode by pointing to the Repository folder. HP IA will execute from the package source at \\CM01\share\HPIA and use the offline repository we developed. This command will be added to the Deployment Task Sequence as a Run Command:

NOTE: When scripting HPIA you can use /Silent and /Noninteractive switches. /Currently, both should behave similarly, but one should be sufficient, for example /Noninteractive alone.

HPImageAssistant.exe /Operation:Analyze /Action:Install /Selection:All /Offlinemode:"\\CM01\share\softpaqs\Repository" /SoftpaqDownloadFolder:C:\HPIA /ReportFolder:C:\HPIA\Logs /Noninteractive /Debug

Let’s package this for MEMCM


The HP Image Assistant Package

The HP Image Assistant application will also need an MEMCM package. Create a new package, select ‘Do not create a program’, and complete the process.

Next, distribute the Package

Deployment Task Sequence

Open the Deployment Task Sequence, and after the Windows image is applied step and after the first reboot, add a new Run Command step.

Use the command shown next for the command line. The /offlinemode: parameter is what tells HP Image Assistant to look at a repository instead of for available Softpaqs to install.

NOTE: the /SoftpaqDownloadFolder: option is where the downloaded Softpaqs will reside before they are installed on the client. This example will save the files on C:\HPIA. If there is no need to keep the Softpaqs in the client, the path could be set to something like /SoftpaqDownloadFolder:.\downloads, which will then be cleaned up at the end of the Task Sequence.

NOTE: the /Debug option will make HP IA write a working log, in our case due to running prior to user profiles being created, will reside at C:\Windows\Temp\HP Image Assistant.log

HPImageAssistant.exe /Operation:Analyze /Action:Install /Selection:All /Offlinemode:"\\CM01\share\softpaqs\Repository" /SoftpaqDownloadFolder:C:\HPIA /ReportFolder:C:\HPIA\Logs /Noninteractive /Debug

Check the ‘[X] Package” setting on the page,  and point to the HP IA package created earlier. Also check ‘Continue on error’ in the Options tab. This is necessary in case a Softpaq does not install correctly.  Without ‘Continue on error’  the step might end in an error state.

Note that we are also putting the HPIA log files in the client’s C:\HPIA\Logs folder

When the Task Sequence executes, after the first reboot, HP Image Assistant downloads from its package source and runs on the client. The /OfflineMode: parameter references the repository share to pull all needed Softpaqs to install on the client.

Once the client rebooks, you will see the downloaded Softpaqs in C:\HPIA and the logs at C:\HPIA\Logs

Author : dan.felman

Hi, great post. But when running HPIA during the taks sequence, shouldn't you add the /UWP:No option as UWP apps can't we installed during the OSD task sequence and your recommendation is to only install after OSD

many of those softpaqs contain more than just a "uwp" app. They also contain the inf or sometimes a lan/wan switching service (such as hotkeys). As such running the softpaq may be a good idea even if you don't get the actual appx bits installed in the task. See this blog for more info on appx

When running the Invoke-RepositorySync the first time, I got the message: Repository synchronization failed: File ...\Repository\sp101987.exe has invalid or missing signature and will be deleted. I see a -quiet option for that cmdlet. Any way to continue on error to continue building the repository? The second time I ran it it got past that file and finished, but I had to watch it to make sure it finished.

I have set up my repository with the drivers for Win10 1803, 1809 and 1909 for the following products: 829A, 8299, and 83B2. I have run HPIA with the correct command on 3 systems all running win10 enterprise. 2 systems running Win10 1803 failed with the following message in the log after the analysis completes: Exception (Handled): Object reference not set to an instance of an object. the third system is running 1809 and it competed with no issues. I upgraded one of the systems (HP EliteDesk 800 G3 DM 35W 829a) that failed to 1809 and then it completed as well with no issues and updated the drivers as expected. The remaining failure is an HP EliteDesk 800 G3 SFF 8299. I am going to try to find different models/ operating systems to test.

eric.schloss, a new version of HP IA was recently released, 4.5.8, SP103654. Please test with this updated version... there was short time over the past couple of weeks where many of the Softpaqs were repackaged due to new signing certificates, which caused problems on certain systems... let us know if you see additional problems... btw, HPIA's debug file can be useful in helping troubleshoot driver deployment problems. It can usually be found on the client at c:\windows\temp under the name "hp image assistant.log"... if not there, you can search for the file in the c: drive

I'm trying to build my repository and keep getting the following error: Exception calling "GetResponse" with "0" argument(s): "The operation has timed out" How can I lengthen the timeout period to build my repository?

dgordon, can you provide details on your commands you are use to create the repository?

dgordon, can you provide details on your commands you are use to create the repository?

I created a repository with the following 4 categories - BIOS, firmware, driver and dock. Executing HPIA (having it point to repository) downloads and installs all but 'Intel Thunderbolt 3 driver - sp101140' . Looking at the 'Activity.log' in the repository, sp101140 was not even attempted for download. Please let me know what I'm missing. I believe Thunderbolt driver is covered either as part of 'driver' or 'dock' category.

It seems there is an error in the Thunderbolt driver CVA file where the category= entry is not correct. We have asked for a fix... in the meantime, you can add a single statement to your repository sync by pulling in a 'get-softpaq -number 101140' for the particular driver

Thanks for suggesting the workaround, it worked!

Hi Dan, If i use 'get-softpaq -number 101140', sp101140.exe gets downloaded to the repository but the .cva file doesn't download. As a result, HP Image assistant doesn't use this driver while it installs drivers on a PC. It still sees sp101140 as missing in the repository.

if you want to do it this way you also need get-softpaqmetadata Although the CVAs should have been fixed and the HPIA reference images will be regenerated soon.

Get the following for all sub modules when running "Install-Module -Name HPCMSL" WARNING: The specified module 'HP.Private' with PowerShellGetFormatVersion '2.0' is not supported by the current version of PowerShellGet. Get the latest version of the PowerShellGet module to install this module, 'HP.Private'. Also, I am not able to get the /Offlinemode switch to work. trying to use the following command. HPImageAssistant.exe /Operation:Analyze /Action:Install /Selection:All /Offlinemode:"\\sever\osd\Drivers\Source\HP\HP Z4 G4 Workstation\Repository" /SoftpaqDownloadFolder:C:\ProgramData\Drivers /ReportFolder:"\\server\OSD\Drivers\Source\HP\Logs\%ComputerName%" /Noninteractive /Debug /BIOSPwdFile:AdminPwd.bin receive the following error: /OfflineMode Repository path invalid \\pdxwswlbp001\osd\Drivers\Source\HP\HP Z4 G4 Workstation\Repository

sounds like you need an update to powershellget also, every instance where a failure to access the offline repository was due to permissions on the repo share. i tested that by first running the script on a client and see if i could access the share, and note the MEM CM uses the local SYSTEM account for tasks on each client. BTW, mapping a share prior to running the command is a good ideas

Trying to add repository for platform 83B2 for Windows 10 21H1. Need the -osver for 21H1, it does not like '21H1' as the version.

you can add the OS version in the OSVER entry in the ini.ps1 file you are using... the main script pulls supported versions you want to see from the INI file

Hi Dan, during task sequence at HPIA step, i am seeing an issue where soon after ethernet driver (can be onboard NIC or dock) gets installed, this particular step fails (yes, it continuous on error). HP Image Assistant.log shows: 10/04/2021 12:54:39 -- Launching 'C:\AonUtils\HPIA\sp113340_AllDocksEthernetDriver\install.cmd' 10/04/2021 12:54:39 -- Successfully launched installation. Waiting up to 10 minutes to finish... smsts.log show: Unhandled Exception: System.IO.IOException: The network path was not found. Process completed with exit code 255 It feels like during network driver install, it lost network connection, and could not recover. Have you seen this before? Thanks!

Im having the exact same erorr as Michael Hung has. As soon as the NIC driver of the NIC that is currently in use installs the program aborts.

Please, provide detail information on what platform you are imaging, what OS version, what WinPE version, and if the update is coming from a local repository or HP cloud... if local repository, is it sync'd and up to date? i don't recall seeing this particular issue previously, but does not mean there is a (realtek) nic version issue occurring or some other problem... btw, if working off a local repository, you can temporarily remove the offending softpaq from the repo (or rename it) to have the process continue

The 2 models I've tried sofar is: HP EliteBook 830 G5 (83B3) Win10 HP EliteBook 840 G6 (8549) Win10 WinPE = 10.19041.1 OSVer = Win10 20H2 I've tried with USB-C dock and builtin Ethernet. Both models fails when currently in use NIC driver is about to be installed. Here are the SPs that stops HPIA HP EliteBook 830 G5 sp113340_AllDocksEthernetDriver sp110164_IntelNICDriver HP EliteBook 840 G6 sp113340_AllDocksEthernetDriver sp104313_IntelNICDriver Here are the logs: Here is the script we run HPIA with I don't believe that there is anything wrong with the SPs since it's consistently failing on Nic drivers on 3 different SPs.

I see the formatting here isn't ideal. Here is my last post in readable format.