Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Windows 11
  • Intune
  • GitHub
  • About
CCMEXEC.COM – Enterprise Mobility

MEMCM TS HP Image Assistant offline repository installation

Posted on April 1, 2021June 22, 2021 by Jörgen Nilsson

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.
  • Automate download of drivers/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”

Task sequence step

Prereqs

The solution uses the following components:

  • Configmgr Webservice – by Nickolaj Andersen https://msendpointmgr.com/configmgr-webservice/
  • 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 install the ConfigMgr webservice, 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
  • Save it to a temp folder like E:\Temp
  • 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 to 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”
  • Open the importHPIA.ps1 and edit the following line to match your environment.
Repository path in the PowerShells script
  • Then edit the config.xml file with all the information in there. Should be self-explained.
Variables in the Config.xml file

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 Webservice 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
HP Software Framework step
  • Edit the “PowerShell download script” so the URL and Secretkey matches your installation of the Configmgr Webservice.
PowerhShell 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.
Again thanks to Daniel Gråhns and Nicklas Eriksson for sharing the solution. Great work!

15 thoughts on “MEMCM TS HP Image Assistant offline repository installation”

  1. Carlos Alba says:
    April 3, 2021 at 12:26 pm

    Hi, great work

    First of all thanks for sharing, is a great and useful work.

    I’ve tried to implement it but it’s not possible to donwload HP Software Framework anymore from FTP.

    Any suggestion ?

    Thanks in advance

    Reply
    1. Jörgen Nilsson says:
      April 3, 2021 at 4:39 pm

      Hi, Thanks for the reminder to add the link, it is availble on the HP FTP
      /pub/caps-softpag/cmit/softpaq file “CASLSetup.exe” (use an FTP software like Winscp for example)

      I hope that helps!
      Regards,
      Jörgen

      Reply
  2. Carlos Alba says:
    April 3, 2021 at 5:54 pm

    Thanks for your quick answer.

    Indeed, it worked like a charm. From the browser I was not able to reach it any download URL. But browsing using WinSCP did the trick ¡¡¡

    Thanks a lot ¡¡¡

    Reply
  3. Henrik says:
    April 8, 2021 at 12:19 pm

    Hi!
    This script is amazing. It works great when I download the drivers with the importHPIA.ps1.
    But I get an error 4097 from the TS-part with the Command line for HPImageAssistant. It seems to be something wrong with the parameters.
    Do I need to change anything there? Do I need a package with the hp image assistant files for running it? I saw HPs documentation for using it in TS and they did that.
    Thanks in advance

    Reply
  4. Andy says:
    April 9, 2021 at 10:33 am

    Hi,

    I’ve tried to implement this in our environment following this post and the script downloads everything, creates the packages and so on.

    But when running the TS it throws an error when trying to install the drivers and software. (The step called “HPImageAssistant”)

    Looking at the log created on the client in C:\HPIA\Logs the following error is shown;
    /OfflineMode Repository path invalid C:\Windows\ccmcache\1\Repository

    And;
    Exception (Handled): RepositoryHPIAMsg.cab is not available in offline repository.

    Running it manually on the client from cmd with the source throws the same error…

    Reply
  5. Daniel Gråhns says:
    April 12, 2021 at 11:19 am

    If you get error 4097 when running HpImageAssistant in TS, run script one more time and then manually upgrade packages on DP’s. First time it runs it does not create a folder that is needed on DP.

    Reply
  6. Daniel Gråhns says:
    April 14, 2021 at 11:13 pm

    Fixed in next version of script, for now try running script one more time and then manually update dp’s and then try again 🙂

    Reply
    1. Jörgen Nilsson says:
      April 15, 2021 at 9:53 pm

      The script is now updated on GitHub which solves the issue.

      Reply
  7. Daniel Gråhns says:
    April 22, 2021 at 10:15 pm

    If you have trouble installing modules update your .net to support tls12
    https://docs.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-server

    Reply
  8. avasi says:
    April 28, 2021 at 1:29 pm

    Hi,
    You write that “PowerShell download script” should be edited … But where can I find the script?
    Thanks.

    Reply
    1. Jörgen Nilsson says:
      April 28, 2021 at 2:50 pm

      Hi, It is the inline script in the Task Seqeunce as shown in the picture
      Regards,
      JÖrgen

      Reply
  9. avasi says:
    May 3, 2021 at 10:56 am

    Hi,
    I’ve tried to implement this in our environment following this post and the script downloads everything, creates the packages and so on.

    But when running the TS it throws an error -2147467259 when trying to run “OSDDownloadcontent” step.

    Can you help me?

    Thanks in advance

    Reply
  10. Daniel Gråhns says:
    May 11, 2021 at 2:03 pm

    Most likely your webservice is not workin, try webservice manually from https://{ServerName}/ConfigMgrWebService/ConfigMgr.asmx and also check the powershell script to see if you have correct address

    Reply
  11. Ruben Rugle says:
    September 6, 2021 at 12:47 pm

    I cant find the OSDDownloadcontent.exe included anywhere? It fails at the OSDDownloadcontent-step

    Reply
    1. Jörgen Nilsson says:
      September 22, 2021 at 10:16 pm

      Hi, It is included in the CM boot media/task sequence enginge.
      Regards,
      Jörgen

      Reply

Leave a Reply Cancel reply

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.

My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
All code is provided "AS-IS" with no warranties.

Recent Posts

  • New settings in Intune Security Baseline Windows 11 24H2 -2504
  • Managing extensions in Visual Studio Code
  • Reinstall a required Win32app using remediation on demand
  • Administrator protection in Windows 11 – First look
  • Remediation on demand script – ResetWindowsUpdate
©2025 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT