Before you start for the HP G5 Dock, you will need:
- the HP Dock Accessory WMI Provider installed on the computer, and
(HPDockWMIProvider.exe) - the computer connected to the dock.
You can then query the dock using
- WMIC
wmic /namespace:\\root\HP\InstrumentedServices\v1 path HP_DockAccessory GET ProductName
- PowerShell
$HPDockWmi = Get-WmiObject -Class HP_DockAccessory -Namespace root/HP/InstrumentedServices/v1 -ErrorAction Stop
What can go wrong?
- If you don’t have the HP Dock WMI Provider installed, you’ll get an error.
- If you don’t have a dock connected, the WMI query will return NULL.
If it works, you’ll see this sort of information
ProductName : HP USB-C Dock G5
Publisher : HP Inc.
SerialNumber : 5CGxxxyyy
State : 0
PSComputerName : NODDYLAND
FirmwarePackageVersion : 1.0.15.0
MACAddress : 64:C9:01:EE:FF:DD
References:
HP Firmware Installer for Docks
Complete WMI query guide with WMI Explorer, Powershell, CMD
Reddit: Deploying HP Softpaq via Windows Update/SCCM/Patch Manager/etc…