UPDATE 2016-10-29:
HP have changed the layout and data type on the HP warranty page, so the script doesn’t work right now. I don’t have the time to update it right now, but I will make a tweet when I do.

 

In this blog post I will show you have to retrieve warranty info from HP website and add it to SCCM.
I have created a PowerShell script that read the computers serial number and the connect to HP website and get the warranty info. Then the script create a WMI class with the warranty info so we can inventory the data with SCCM.

The Script

1. Download find_hp_warranty.ps1

2. Add your country in line 6

3. Change the namespace in line 77 to a name that you want

4. Run it on a couple of computers

SCCM

1. Start the SCCM console and navigate to: Administration –> Client Settings –> Open “Default Client Settings”
image

2. Mark “Hardware Inventory” and click “Set Classes”
image

3. Click “Add”
image

4. Click “Connect”
image

5. Type the name of the computer where you have run the script on in “Computer name”, add the name you wrote in line 77 in the script in “WMI namespace” and click “Connect”
image

6. Mark “HP_Warranty” and Click “OK”
image

7. You should now have the following classes. Click “OK”
image

8. Click “OK”
image

9. Now you have the warranty info in SCCM
image

twitterlinkedin

By Claus