Ae banner

Get HP Warranty Information

gets HP Warranty Info

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

Developer
  • Name: Kaseya Automation Team
  • Company: Kaseya
  • Website: http://www.kaseya.com
  • Contact Developer
  • Summary
  • Get HP Warranty Information
  • 110 Downloads
  • Version:
  • Initially Released December 28th, 2020
  • Reviews
    Gravatar for Wayne Boyles
    by Wayne Boyles on January 4th, 2021

    Needs to be updated to have "HPE" added to the list of Manufacturers. That will cover HP Enterprise servers. Other than that great script.

    Gravatar for Michael Niederer
    by Michael Niederer on December 29th, 2020

    Great script, fast turnaround to fix it. Thanks a lot Gonzalo.

    Discussion
    Gravatar for Michael Niederer
    Michael Niederer 4 months ago

    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.


    Gravatar for Kaseya Automation Team
    Kaseya Automation Team 4 months ago

    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.

    Gravatar for Michael Niederer
    Michael Niederer 4 months ago

    Hi, 

    HP warranty check works,

    Start Date

    October 22, 2018

    End Date

    December 20, 2021

    Gravatar for Michael Niederer
    Michael Niederer 4 months ago

    btw. how can I send a private message?

    Gravatar for Kaseya Automation Team
    Kaseya Automation Team 4 months ago

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

    Gravatar for Kaseya Automation Team
    Kaseya Automation Team 4 months ago

    Hi Michael,

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

    Gravatar for Patrick Doman
    Patrick Doman 4 months ago

    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

    Gravatar for Kyle Dumas
    Kyle Dumas 4 months ago

    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.

    Gravatar for Locojalapeno
    Locojalapeno 4 months ago

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

    Gravatar for Kaseya Automation Team
    Kaseya Automation Team 4 months ago

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

    Gravatar for Susan Mertesdorf
    Susan Mertesdorf 4 months ago

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

    Gravatar for Patrick Doman
    Patrick Doman 4 months ago

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

    Gravatar for Patrick Doman
    Patrick Doman 4 months ago

    Good catch Loco,

    Gravatar for Kyle Dumas
    Kyle Dumas 4 months ago

    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?


    Gravatar for Michael Niederer
    Michael Niederer 4 months ago

    Hi all

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

    Gravatar for Susan Mertesdorf
    Susan Mertesdorf 4 months ago

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

    Gravatar for Cherian Mathew
    Cherian Mathew 4 months ago

    Did it work for Win 7 PCs?

     


    Gravatar for Kaseya Automation Team
    Kaseya Automation Team 4 months ago

    testing is still underway Susan.


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

    Gravatar for Cherian Mathew
    Cherian Mathew 4 months ago

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


    Gravatar for Daniel Gifford
    Daniel Gifford 3 months ago

    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?

    Gravatar for Daniel Gifford
    Daniel Gifford 3 months ago

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

    Gravatar for Daniel Gifford
    Daniel Gifford 3 months ago

    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.

    Gravatar for David Bennett
    David Bennett 2 months ago

    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.

    Gravatar for Kaseya Automation Team
    Kaseya Automation Team about 2 months ago

    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.