Driver injection with HP Image Assistant and HP CMSL in MEMCM

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

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 softpaq store grew in size and number of softpaqs. The HP CMSL can clean up the repository so that only the latest release of a Softpaq (bios, driver, software, etc.) is maintained and is always ready for use by HPIA.

The following outlines a method to create and maintain a repository for use by HPIA, a way to set up Microsoft MEMCM to use it for client installations or updates, and download from a MEMCM Distribution point, instead of from HP sites

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

Creating a Repository

The setup requires we use the HP Client Management Script Library to collect, download, and maintain a repository of HP Softpaqs by model and OS version. 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

NOTE: If the PowerShellGet cmdlet needs installed, install it with this command:

PS> Install-Module –Name PowerShellGet –Force

Or, if an update is required for proper access to the PowerShell Gallery:

PS> Update-Module –Name PowerShellGet

The CMSL can also be added by downloading the Softpaq on the MEMCM server where the commands will be run. Documentation for the CMSL is hosted here.

For this exercise, let’s assume the MEMCM server is named CM01, the MEMCM share is set to \\CM01\share, and that 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.

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 and CD to that folder for the following steps (this is from an example repository)
PS> MD \\CM01\share\Softpaqs\Repository
PS> CD \\CM01\share\Softpaqs\Repository
PS \\cm01\share\softpaqs\repository> Initialize-Repository         # do once
  1. Critical step when a repository folder is to be used 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.

         These commands need to be executed from the repository folder, as they do not have a way to specify a repository. They expect to use 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 to this list of commands 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 fail also. 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: 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:

HPImageAssistant.exe /Operation:Analyze /Action:Install /Selection:All /Offlinemode:"\\CM01\share\softpaqs\Repository" /SoftpaqDownloadFolder:C:\HPIA /ReportFolder:C:\HPIA\Logs /Noninteractive /Silent /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 /Silent /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?