I have put together a robust HP Warrant Lookup PowerShell script. However, I cannot figure out how to get a HP system's product number in an automated process. So...
How can I get HP product number (not the serial number) via PowerShell? Although I would like to do with only built-in out-of-the-box Windows and PowerShell commands, I am open to other ideas. In the end, the ultimate goal is retrieve the product number in the most reliable and least invasive way possible (i.e. installing 3rd software).
Troubleshooting
Tried:
Get-WmiObject Win32_ComputerSystem | Select-Object OEMStringArray
Result:
{ABS 70/71 79 7A 7B 7C, CMS v01.4A, HP_Mute_LED_0, www.hp.com}
... But expecting to find XT908UT#ABA
wmic csproduct list /format:list
/wmic computersystem list /format:list
HKLM\HARDWARE\DESCRIPTION\System\BIOS\SystemSKU
so can be retrieved in PowerShell. This one sayswmic /namespace:\\root\wmi path MS_SystemInformation
. Does any of these work for you?Get-WmiObject Win32_BIOS | Select-Object SerialNumber
(I have no HP to test this on).