The HP Image Assistant (HPIA) has been around for a little over a year. I hadn’t given it much thought until my HP Technical Consultant shared some of the capabilities of the product. It turns out, this product makes my previous post on HP SSM usage a bit outdated.
Why HPIA over SSM?
There are many advantages to using HPIA over SSM. When SSM is used in a task sequence, it actually needs to be run twice. This will allow for installing the management engine driver on the first pass, followed by updating management engine firmware on the second pass. HPIA has some logic built in for handling these types of issues in the proper order. Overall, HPIA also runs faster than SSM.
How does HPIA work?
Download and extract the latest HPIA version. Running HPImageAssistant.exe as an admin will give you a GUI with relevant information about the current machine. When run with a silent command, HPIA reaches out to the HP servers to download what is needed for the current model and running Windows build. Once the needed softpaqs are downloaded, they are automatically expanded locally and applied to the system.
There are multiple silent ways that HPIA can be used. What fits best for your organization will depend on a lot of factors. There are pros and cons to each of the following methods, which I will detail later in this post.
- Allow HPIA to download what is needed directly from HP.
- Allow HPIA to download what is needed directly from HP, but also build a repository on a shared UNC path within your network.
- Use the HP Client Script Management Library to automate sync and cleanup of softpaq repositories for use with ConfigMgr packages.
Method 1: Allow HPIA to download what is needed directly from HP.
The following silent command will analyze the current model, then download and install any needed firmware and driver softpaqs.
HPImageAssistant.exe /Operation:Analyze /Action:Install /Selection:All /Silent /ReportFolder:C:\SrcCode\HPIA\Logs /SoftpaqDownloadFolder:C:\SrcCode\HPIA\Drivers /BIOSPwdFile:pwd1.bin
This method is a good way to try out the solution, but does not scale well as you will need to wait for each individual device to download and extract what it needs from HP servers. The /SoftpaqDownloadFolder switch will determine where the softpaqs are stored. Subsequent runs of the silent command on the same system will be quicker as softpaqs that do not have a newer version released will not need to be downloaded again. You can also create a ConfigMgr package containing the HPIA extract if you don’t mind the machine reaching out to HP and downloading everything into the local package cache every time OSD or IPU is run.
Method 2: Allow HPIA to download what is needed directly from HP, but also build a repository on a shared UNC path within your network.
This method is a slight improvement compared to method 1 as the shared UNC path will contain softpaqs for all models in your environment. The following example also places the log file in the same share.
HPImageAssistant.exe /Operation:Analyze /Action:Install /Selection:All /Silent /ReportFolder:\\server\share\HPIA\Logs /SoftpaqDownloadFolder:\\server\share\HPIA\Drivers /BIOSPwdFile:pwd1.bin
This is a good solution for manually running, and could also be used with a ConfigMgr package containing the HPIA extract. In this case, the task sequence step would use what has been previously downloaded to shared UNC path. Should HP release a newer version of anything, the first client running HPIA silently will automatically download and extract the newer version to the shared UNC path. Subsequent runs will again use what is there.
Method 3: Use the HP Client Script Management Library to automate sync and cleanup of softpaq repositories for use with ConfigMgr packages.
Method 1 and 2 are easy ways to get started with HPIA. Unfortunately, both these methods do not include a cleanup feature. To keep the repository clean and reclaim used disk space, you would periodically need to delete the contents of the shared UNC path and start over. Also, many environments do not have fast links between sites, so connecting to a shared UNC path may not be ideal. Using much of the same script from my previous SSM post, method 3 will keep the model repositories synchronized and cleaned up, and distributed through ConfigMgr. Much of the script is the same, with two main differences.
- Instead of copying the SSM files, I am now copying the latest version of the HPIA extract to each package.
- Older platforms often do not have the newest cab file support for the osver option in the script. After discussing with @nkofahl (Client Technology Consultant with HP), the least risky option is to use the newest cab osver available for each model with the newest Windows 10 build. Test this thoroughly, as your mileage may vary. For now, I have added the latest supported osver to the model table to account for which of our models do not support 1903. HP is working toward a way to
programmically return a list of supported osver, which will allow for automating the osver choice. I recommend manually determining which Windows 10 builds are supported for your models by creating a temporary repository, adding a filter for each of your models, and invoke a sync. You will receive a failure should a data file not be found for the platform.
EDIT: Running HPImageAssistant.exe, then selecting ‘Supported Platforms’ under the ‘Help’ menu.
The following script will loop through the models table and do the following:
1. Update an existing repository or create a new repository if one doesn’t exist
2. Setup email alerts to notify of sync failures
3. Invoke a repository sync for bios and driver and firmware categories
4. Invoke a repository cleanup to remove old versions
5. Ensure the needed HPIA files are up to date
Running the Script: The script can be run on demand or as a scheduled task. Unless you include the -quiet switch on the Invoke-RepositorySync command, you should see something similar to the following when running the script.
Logging: The logging feature was created by @EphingPosh and is posted at https://www.ephingadmin.com/powershell-cmtrace-log-function/. In my environment, I added this as a separate module, but it could be added to the top of the script as well. This logging is done in CMTrace format for easy readability.
Repository Logging: In addition to the script log, HP has a useful repository log called activity.log located in the \.repository subfolder. This shows information about all repository activity (total number of SoftPaqs to be downloaded, what file is currently being downloaded to the repository, etc).
CVA Files: The CVA files that accompany each SoftPaq include the details about what models the SoftPaq is applicable, among other info. These files are frequently updated, so the Invoke-RepositorySync downloads and overwrites these files at every sync. They are very small text files, so this step does not usually increase the script runtime significantly.
In order to use HPIA within a task sequence, a package needs to be created and distributed. The script above created the folder structure and all the files needed. At this point, create a package without a program for each of your models. Because I run the repository script as a scheduled task, I enabled the ‘Update distribution points on a schedule’ and ‘Enable binary differential replication’ options on the package to automatically distribute updated content to distribution points.
Task Sequence Setup
Within a task sequence, add a ‘Run Command Line’ after the first reboot into the Full OS. Use the package you created for the specific model, and run the following command line. My previous blog posts have queried the model from Win32_ComputerSystem. My HP Technical Consultant recommended changing to querying Win32_baseboard as that is more accurate.
During the task sequence, the HPIA package is downloaded to the local client cache, which includes the HPIA extract itself and all updated softpaqs based on the repository sync. Within the local cache, HPIA will extract and install the softpaqs. HPIA will also check HP servers and download any newer versions of the softpaq to the local cache. This download is only local to that particular machine, so if you happen to image multiple machines with the outdated repository, they will all have to complete the download. This shouldn’t happen too often depending on how frequently the repository update script is run.
I have a bios password configured on all systems. Note the /BIOSPwdFile switch in the HPIA command. This will need to be utilized with an encrypted password bin file in the package in order to update the bios category with HPIA. Creating the encrypted bin file is rather self explanatory using the HP Bios Configuration Utility (BCU). I have also recently learned that the
HP Client Script Management Library has a
Set-HPBiosSettingValuesFromFile function that could also be used in place of the BCU. This will allow for the password to be passed as a string, and also configured to have the cmd not log. This results in no bin file remaining. @miketerrill intends to release a blog post on this after the @MMSMOA conference concludes.