Getting HP Warranty Information

Welcome Forums General PowerShell Q&A Getting HP Warranty Information

This topic contains 3 replies, has 2 voices, and was last updated by

4 years, 7 months ago.

  • Author
  • #12824

    Points: 0
    Rank: Member

    I have tried several different ways but I cannot seem to find this information. Does anyone have any ideas or has done this before? I have been reading that you can extract the serial and productID from wmi, which I have done. Then use these to run a web query against HP's warranty page and return the date. any information on this is greatly appreciated.

  • #12880

    Points: 0
    Rank: Member

    function Execute-SOAPRequest {
    Param (

    write-Output "Sending SOAP Request To Server: $URL"
    $soapWebRequest = [System.Net.WebRequest]::Create($URL)

    $soapWebRequest.ContentType = 'text/xml; charset=utf-8'
    $soapWebRequest.Accept = "text/xml"
    $soapWebRequest.Method = "POST"
    $soapWebRequest.UserAgent = 'RemoteSupport/A.05.05 - gSOAP/2.7'

    $soapWebRequest.ServicePoint.Expect100Continue = $False
    $soapWebRequest.ServicePoint.MaxIdleTime = 2000
    $soapWebRequest.ProtocolVersion = []::version10

    write-Output "Initiating Send."
    $requestStream = $soapWebRequest.GetRequestStream()

    write-Output "Send Complete, Waiting For Response."
    $resp = $soapRequest.GetResponse()
    $responseStream = $resp.GetResponseStream()
    $soapReader = [System.IO.StreamReader]($responseStream)
    $ReturnXml = [Xml]$soapReader.ReadToEnd()

    write-Output "Response Received."

    return $returnxml

    $SOAPRequest = [Xml](Get-Content 'C:\Temp\SoapEnv.xml')
    $URL = ''

    Execute-SOAPRequest $SOAPRequest $URL

    With the xml file



    Any ideas?

  • #13376

    Points: 0
    Rank: Member

    Hi Oliver, did you ever figure this out?

  • #13400

    Points: 0
    Rank: Member

    Hi Garth,

    You can find a copy of the script here:

    It works fine on Powershell 3.0 I am just having some problems getting it to work on powershell 2.0. I deployed it the servers I monitor using our RMM tool. It is great to see the warranty information along with everything else.

The topic ‘Getting HP Warranty Information’ is closed to new replies.