Snag a ticket to Connect IT Global - virtual & in-person tickets are still available > https://www.connectit.com/global/

Get HP Warranty Information

Kaseya Automation Team
Kaseya Automation Team Member, Kaseya Certified
edited September 15 in Product

Product Name: Get HP Warranty Information

Description : 2021 UPDATE: LENOVO HAS CLOSED THEIR OPEN WARRANTY API, IT IS NO LONGER POSSIBLE TO GATHER WARRANTY INFORMATION WITHOUT A CLIENT ID

This procedure will pull HP/Lenovo Warranty Information such as serial number, expiration date, etc and place it into custom fields on the VSA. This procedure leverages powershell.

AS IS DISCLAIMER:
The following agent procedure pulls warranty information from HP/Lenovo Servers. It utilizes open APIs to accomplish this. At any moment, Lenovo or HP may remove this access. In this event, Kaseya may be unable to make this procedure function. Please keep this in mind when utilizing this procedure.

Please see attached pdf for installation instructions

Instructions :

Please see attached pdf for installation instructions

Comments

  • Michael Niederer
    edited December 2020

    Hi

    just tested the script on some HP notebooks but the only result I get back is the serial number, all other fields stay empty.


  • Kaseya Automation Team
    Kaseya Automation Team Member, Kaseya Certified
    edited December 2020

    Hey Michael,

    I would first confirm the serial number is indeed able to return real data by going to https://support.hp.com/us-en/checkwarranty if so, if you provide me the serial in a private message, i can review.

  • Michael Niederer
    edited December 2020

    Hi, 

    HP warranty check works,

    Start Date

    October 22, 2018

    End Date

    December 20, 2021
  • Michael Niederer
    edited December 2020

    btw. how can I send a private message?

  • Kaseya Automation Team
    Kaseya Automation Team Member, Kaseya Certified
    edited December 2020

    send me a private message by clicking "Contact Developer" on the main product page https://automationexchange.kaseya.com/products/964

  • Kaseya Automation Team
    Kaseya Automation Team Member, Kaseya Certified
    edited December 2020

    Hi Michael,

    The script has been fixed, there was a malformed exception with the date stamp. please try again.

  • Patrick Doman
    Patrick Doman Member
    edited December 2020

    I have a number of systems that are Lenovo desktop / workstations. The systems that aren't populating with anything other than a T in the Warranty Description field all begin with MJ.   The manufacturer is always Lenovo in the listing. Even for the ones that are working

  • Kyle Dumas
    Kyle Dumas Member
    edited December 2020

    I tried to run the powershell script through Kaseya but it failed to populate data. I then ran the script locally and received the following error.

    "Failed to invoke SOAP request: Exception calling "GetResponse" with "0" argument(s): "The underlying connection was closed: An unexpected error occurred on a send."

    I then checked on the VSA for "System Information" under the Machine Summary is completely blank with no data..... Any suggestions would be greatly appreciated.

  • Locojalapeno
    Locojalapeno Member
    edited December 2020

    Failed to invoke SOAP request has to do with HTTP failures. So probably your web content filter is killing it.

  • Kaseya Automation Team
    Kaseya Automation Team Member, Kaseya Certified
    edited December 2020

    Hey Patrick, can you message me directly via "Contact Developer" along with an example serial number so i can test it?

  • Susan Mertesdorf
    edited December 2020

    I've got the same issue as Patrick...some are working great, some are just showing a T.  I'll do the same.

  • Patrick Doman
    Patrick Doman Member
    edited December 2020

    They are  looking at it now. Kyle, which systems are you trying to pull serials for? Lenovo or HP?

  • Patrick Doman
    Patrick Doman Member
    edited December 2020

    Good catch Loco,

  • Kyle Dumas
    Kyle Dumas Member
    edited December 2020

    Patrick, I am pulling HP info...or trying to.

    The section for system information in Machine Summary is also blank any idea why that is?


  • Michael Niederer
    edited December 2020

    Hi all

    just tested the new script and it works for HP Notebooks and Desktops.

  • Susan Mertesdorf
    edited December 2020

    Any word on why some Lenovo systems are pulling the Serial number, but then just a T for the Description and no other information?

  • Cherian Mathew
    edited December 2020

    Did it work for Win 7 PCs?

     


  • Kaseya Automation Team
    Kaseya Automation Team Member, Kaseya Certified
    edited December 2020

    testing is still underway Susan.


    Cherian, this should work on any OS that supports later versions of powershell

  • Cherian Mathew
    edited December 2020

    The Registry is populated but VSa not updated only for Win 7 works fine with Win 10


  • Daniel Gifford
    edited January 20

    Script works great but for HP we notice that when an endpoint has an extended warranty, it does not show this. It only shows the base warranty. Anyway around this?

  • Daniel Gifford
    edited January 20

    Another thing, some HP devices require a product number to lookup the warranty. Any chance in having that included?

  • Daniel Gifford
    edited January 20

    I fixed the issue with some HP products requiring a product number. See below:

    $root='HKLM:\SOFTWARE\WOW6432Node\KaseyaWarrantyInfo'

    $Bios = Get-WmiObject Win32_Bios -ComputerName $env:COMPUTERNAME -ErrorAction Stop

    $ComputerSystem = Get-WmiObject Win32_ComputerSystem

    $Manufacturer = $Bios.Manufacturer

    $SerialNumber = $Bios.SerialNumber

    $ProductNumber = $ComputerSystem.SystemSKUNumber

    $ProductNumber = $ProductNumber.substring(0, $ProductNumber.lastIndexOf('#'))

    Then you add the Product Number variable to your SOAP request. See below:

    $request = @"
                <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="http://interfaces.obligation.sbs.it.hp.com/">
                    <soapenv:Header />
                    <soapenv:Body>
                        <int:retrieveServiceObligationResponsesByServiceObligationRequests>
                            <context>
                                <appContextName>HPSF</appContextName>
                                <userLocale>en-US</userLocale>
                            </context>
                            <obligationRequests>
                                <lnkServiceObligationDepthFilter>
                                    <includeProductObjectOfServiceInstance>true</includeProductObjectOfServiceInstance>
                                    <includeServiceObligation>true</includeServiceObligation>
                                    <includeServiceObligationHeaderOffer>true</includeServiceObligationHeaderOffer>
                                    <includeServiceObligationMessage>true</includeServiceObligationMessage>
                                    <maxNumberOfProductObjectOfServiceInstance>100</maxNumberOfProductObjectOfServiceInstance>
                                </lnkServiceObligationDepthFilter>
                                <lnkServiceObligationEnrichment>
                                    <iso2CountryCode>US</iso2CountryCode>
                                </lnkServiceObligationEnrichment>
                                <lnkServiceObligationProductObjectOfServiceIdentifier>
                                    <hpProductNumber>$ProductNumber</hpProductNumber>
                                    <hpSerialNumber>$S</hpSerialNumber>
                                </lnkServiceObligationProductObjectOfServiceIdentifier>
                            </obligationRequests>
                        </int:retrieveServiceObligationResponsesByServiceObligationRequests>
                    </soapenv:Body>
                </soapenv:Envelope>

    It will then be able to request the warranty status if a product number is needed.
  • David Bennett
    David Bennett Member
    edited February 1

    Is the Lenovo API still open? $RequestResult.wiOutputForm keeps coming back null when I run the ps1. I know the AP is able to finish running because it creates the KaseyaWarrantyInfo entry in registry.

  • Kaseya Automation Team
    Kaseya Automation Team Member, Kaseya Certified
    edited February 23

    Hello everyone,

    We have updated the suggested fixes in the HP request, however we have confirmed that Lenovo has closed its open API's. It is no longer possible to get lenovo warranty information without a client id. This procedure has been renamed to an HP warranty check.

  • Kyle Dumas
    Kyle Dumas Member
    edited April 22

    Can anyone verify that the HP method still works? I keep getting "Failed to invoke SOAP request:" I posted about this error a while back and was asked to verify it wasn't a firewall issue. I am on an HP laptop not behind a firewall and still getting the error.

  • David
    David Member
    edited May 12
    I am in the same boat and I am trying to see if this method still works, I have tried running the Procedure, and it says that it was a success, but when I go to lookup the Warranty info in the Custom Fields in the Audit page, there is no data at all in the Custom Fields and is just blank.
  • Jiun Heng
    Jiun Heng Member CHOCOLATE MILK
    edited June 11

    What if I do have a CLIENT ID? 

    How about this >>
    https://supportapi.lenovo.com/Documentation/Index.html

  • hwsystems
    hwsystems Member CHOCOLATE MILK

    Can anyone confirm if the HP lookup is still working.

    Thanks

    Andy

  • Gonzalo Carrillo
    Gonzalo Carrillo Miami, FLMember, Kaseya Certified, Kaseyan, Automation Exchange Administrator

    MODERATOR

    @hwsystems It seems that HP may be blocking the open API.