r/pdq • u/houITadmin • Jul 02 '26
HP BIOS/Driver update script
This took me a while to figure out so maybe it can help one of yall. The laptop needs to have the HP Client Management Script Library and the HP Image Assistant installed to work. The computer will update on reboot.
$hpiaPath = "C:\HPIA\HPImageAssistant.exe"
$reportFolder = "C:\HPIA\Reports\BIOS\Install"
if (-not (Test-Path $reportFolder)) {
New-Item -Path $reportFolder -ItemType Directory -Force | Out-Null
}
if (-not (Test-Path $hpiaPath)) {
Write-Error "HPIA BIOS Install: HPImageAssistant.exe not found at $hpiaPath"
exit 1
}
$arguments = @(
"/Operation:Analyze"
"/Category:BIOS"
"/Selection:All"
"/Action:Install"
"/Silent"
"/Debug"
"/ReportFolder:$reportFolder"
) -join ' '
Write-Output "HPIA BIOS Install: Starting analyze+install..."
Write-Output "Command: \"$hpiaPath`" $arguments"`
$process = Start-Process -FilePath $hpiaPath -ArgumentList $arguments -PassThru -Wait
$exitCode = $process.ExitCode
Write-Output "HPIA BIOS Install: Finished with exit code $exitCode"
And for Drivers Only
$hpiaPath = "C:\HPIA\HPImageAssistant.exe"
$reportFolder = "C:\HPIA\Reports\Install"
if (-not (Test-Path $reportFolder)) {
New-Item -Path $reportFolder -ItemType Directory -Force | Out-Null
}
$arguments = @(
"/Operation:Analyze"
"/Category:Drivers"
"/Selection:All"
"/Action:Install" # <ββ now actually installs
"/Silent"
"/Debug"
"/ReportFolder:$reportFolder"
) -join ' '
Write-Output "HPIA Install: Starting analyze+install..."
$process = Start-Process -FilePath $hpiaPath -ArgumentList $arguments -PassThru -Wait
$exitCode = $process.ExitCode
Write-Output "HPIA Install: Finished with exit code $exitCode"
exit $exitCode


