Initialize-HPImageAssistant
Overview
Initialize-HPImageAssistant.ps1
is a PowerShell automation script designed for IT administrators to efficiently manage updates and firmware on HP workstations using HP Image Assistant (HPIA). It addresses the tedious, error-prone manual process of validating, acquiring, and installing driver, firmware, BIOS, and software updates on HP business PCs by fully automating:
- Environment and hardware validation
- Downloading and managing HP’s update tools
- Running update scans and applying updates
- Providing structured, human-readable reports
This tool is ideal for standardizing HP client environments, keeping endpoints secure, compliant, and up to date with minimal manual intervention.
For complete documentation on supported arguments, refer to: HP Image Assistant User Guide
Requirements
Software:
- Windows PowerShell 5.1 or higher
- Windows 10 or Windows 11 (x64)
- Internet access (for platform validation, downloading updates and HP Image Assistant)
- Administrative privileges (run as Administrator)
Hardware:
- HP workstation or desktop (validated via manufacturer and product ID)
Modules:
- Strapper module (automatically installed/updated as part of the script)
Other:
- The HP Image Assistant executable. Script checks/installs it automatically if not present.
Process
Initialize-HPImageAssistant.ps1
proceeds through these operational stages:
- Initial Setup
- Configures security settings and PowerShell preferences.
- Sets up required working directories.
- Ensures administrative privileges.
- System Validation
- Confirms device is HP hardware.
- Verifies supported Windows OS version (10/11).
- Downloads and extracts HP’s official platform compatibility list.
- Aborts gracefully if preconditions are not met.
- HP Image Assistant Management
- Locates the HPIA executable (existing or fresh install via winget).
- Installs or updates HPIA automatically if missing.
- Update Processing
- If custom arguments are provided, they’re passed to HPIA.
- Otherwise, performs a default scan for pending updates.
- Handles HPIA exit codes, presenting meaningful feedback and error messages.
- Parses and outputs update recommendations in a structured way.
- Reporting
- Logs actions, progress, and results to a persistent log file.
- Outputs scan results and update recommendations in console and file.
Payload Usage
This script does not use any direct payload file but expects parameters when executed.
Typical Usage:
-
To fetch and list down available updates (default, no params):
.\Initialize-HPImageAssistant.ps1
-
To perform an update action (for example, silent install of recommended driver updates):
.\Initialize-HPImageAssistant.ps1 -Argument '/Operation:Analyze /Category:Drivers /Selection:Recommended /Action:Install /Silent /AutoCleanup /ReportFilePath:`
"C:\ProgramData\_Automation\App\HPImageAssistant\InstallReport"' -
To perform an update action (for example, silent install of recommended firmware updates):
.\Initialize-HPImageAssistant.ps1 -Argument '/Operation:Analyze /Category:Firmware /Selection:Recommended /Action:Install /Silent /AutoCleanup /ReportFilePath:`
"C:\ProgramData\_Automation\App\HPImageAssistant\InstallReport"' -
To perform an update action (for example, silent install of all available updates):
.\Initialize-HPImageAssistant.ps1 -Argument '/Operation:Analyze /Category:All /Selection:All /Action:Install /Silent /AutoCleanup /ReportFilePath:`
"C:\ProgramData\_Automation\App\HPImageAssistant\InstallReport"'
Explanation:
- If no
-Argument
is specified, the script simply scans and lists available updates. - If you pass
-Argument
, it’s directly relayed to HPIA, allowing full control over operation such as installing, reporting, filtering by update type, etc.
Parameters
Parameter | Alias | Required | Default | Type | Description |
---|---|---|---|---|---|
Argument | No | String | (Optional) Arguments to provide to HP Image Assistant. If omitted, performs a scan only. |
Output
Location of output/log files:
- Logs are created at:
.\Initialize-HPImageAssitant-log.txt
.\Initialize-HPImageAssitant-error.txt
- Update reports (XML or JSON, depending on operation) at:
C:\ProgramData\_Automation\App\HPImageAssistant\UpdateReportPath\HPIAApplicableUpdates.xml
(or wherever you specify with/ReportFilePath:
in your argument) - Error and status messages are output to the console during execution and detailed in the log file.
Sample output (when running a scan):
Type : Software
Id : sp107620
Name : HP Hotkey Support
TargetVersion : Not Installed
ReferenceVersion : 6.2.55.1
Comments : HP install recommended
SSMCompliant : True
DPBCompliant : False
Url : ftp.hp.com/pub/softpaq/sp107501-108000/sp107620.exe
ReleastNotesUrl : ftp.hp.com/pub/softpaq/sp107501-108000/sp107620.html
CvaUrl : ftp.hp.com/pub/softpaq/sp107501-108000/sp107620.cva
...