New version of HPIA automation in a TS – MASHPIA

New version of Mashpia 😊 (Yes the solution has a name now!)

Biggest improvements in the new version is we are moving away from webservice to using the built-in adminservice from ConfigMgr!

This solution is provided to the Community by Daniel Gråhns and Nicklas Eriksson, Twitter(Sigge_gooner), thank you for sharing it! Great work!

As the title says it is a solution for deploying drivers and software during a Task Sequence using HP Image Assistant. The benefit of using this is that you can automate the whole process of downloading and updating drivers and solve the additional software needed for HP devices. Including the software needed as that is not included in the driver packs.
The purpose of this solution is to:

  • Install HP drivers and related Software during OS Deployment or drivers update.
  • Automate download of drivers, bios and software
  • Create and distribute packages in Configuration Manager
  • Easily update the drivers/software to the latest version automatically

How does it work

In the folder with the scripts, we have the following files.

Sample folder structure

All configuration is done in the Config.xml file by editing the variables there. Site Code, Package path and more, It is well documented in the script.
In the Import-models.csv file we simply put the Basebord ID, Modelname and OS version as shown below.

Import-models.csv Sample

Then we run the script, it will download the Softpaqs, create a Package and distribute it to the dp group we select in the config. We will cover that later in this post.
The script will automatically install HPCSML and update it if needed.

Import script running

In the task sequence we run the following commands that will use the Configmgr Webservice to populate the variables for which package should be used.
Then it is downloaded and installed by using the image assistant and the files downloaded to the local disc as source.

Task Sequence Step

If a second pass of HPIA is needed, which could be the case simply just add that model to the Conditions for the “Second HPIA Pass if needed”

TS Step

Prereqs

The solution uses the following components:

What is the administration service – Configuration Manager | Microsoft Docs

  • Create Serviceaccount with correct permissions in ConfigMgr to be able to query adminservice for information.
  • HP Software Framework – Available on HP FTP /pub/caps-softpag/cmit/softpaq file “CASLSetup.exe” (use an FTP software like Winscp for example)
  • The files for this solution – GITHUB
  • Exported Task Sequence with the steps need – GITHUB
  • Driver Package with the latest WinPE Driver Pack – http://ftp.hp.com/pub/caps-softpaq/cmit/HP_WinPE_DriverPack.html

We will not cover how to enable the ConfigMgr adminservice, that is included in the manual provided with the download above.

HP Software Framework

We need a Package in Configuration Manager with the HP Software Framework. Here is how to download and extract the .msi file.

  • Download the file “CASLSetup.exe” from the HP FTP site
CASLSetup.exe on HP FTP
  • Run the following command:
     CASLSetup.exe /s /x /b”E:\Temp” /v” /qn”
    That will extract the .msi to E:\Temp.
HP Software Framework .msi
  • Then copy the file to your MEMCM Package source share
  • Create a Package and Program in Configuration Manager for the HP Software Framework using the “Create package from definition” and use the .MSI works just fine.
  • Distribute the content to the correct DP group.

HP WinPE driver Package

As we install all drivers using HP Image Assistant we still need storage drivers and network drivers to be installed during OSD to be able to get Windows 10 up and running.

  • Download the HP WinPE package that matches the OS version you are deploying.
  • Import the drivers to a driver package we can then use in the Task Sequence as shown below.
HP WinPE step in the TS

Use the following conditions so it only installs for HP devices.

Condition for HP Devices

PowerShell script

Before we run the script for the first time, we need to configure it for our environment.

  • Download the HPIA.zip file from Github here:
  • Extract the content to a folder, in my example “E:\HP Repository”

How to run the script: .\ImportHPIA.ps1 -Config .\Config.xml

Sample config.xml

Then we are ready to run the script for the first time, there is a log file as well you can use to check for errors if the script is run as a Scheduled Task for example.
The result in my case will look like this.

Packages in CM

And the packages have gotten the information needed for the Configmgr Adminservice to pull them down.

Package Properties

Task Sequence import

The steps needed in the Task Sequence can be downloaded from Github and then imported to make it as easy as possible.

  • Download the Exported task sequence and import it in Configuration Manager
  • Select “Ignore Dependency” when importing it.
Task Sequence import warning
  • Edit the imported task sequence
  • Fix the error so the package for HP Software Management Framework is correct
  • Add serviceaccount as a variable and remember to select “Do not display this value”.
HP Software Framework step

Edit the “PowerShell script” so the input varibels for -Siteserver and OS version matches the that you want to install.

PowerShell script

Copy the whole group included in the Task Sequence so it runs after the full OS is installed.

Putting it all together

Edit the “import-models.csv” file with your information as mentioned above.

Sample import-models.csv

Then it is time to run the script and watch it download the drivers for our models and then test out the deployment. You can schedule it as well of hours and let it update the driver packages if needed.!

One Comment

Add 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.