Getting HP Warranty Information

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Oliver Adams Oliver Adams 3 years, 3 months ago.

  • Author
    Posts
  • #12824
    Profile photo of Oliver Adams
    Oliver Adams
    Participant

    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
    Profile photo of Oliver Adams
    Oliver Adams
    Participant

    function Execute-SOAPRequest {
    Param (
    [Xml]$SOAPRequest,
    [String]$URL,
    [switch]$UseProxy
    )

    write-Output "Sending SOAP Request To Server: $URL"
    $soapWebRequest = [System.Net.WebRequest]::Create($URL)
    $soapWebRequest.Headers.Add("SOAPAction",'"http://www.hp.com/isee/webservices/RegisterClient2"')

    $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 = [system.net.httpversion]::version10

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

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

    write-Output "Response Received."

    return $returnxml
    }

    $SOAPRequest = [Xml](Get-Content 'C:\Temp\SoapEnv.xml')
    $URL = 'https://services.isee.hp.com/ClientRegistration/ClientRegistrationService.asmx'

    Execute-SOAPRequest $SOAPRequest $URL

    With the xml file









    0







    255










    Any ideas?

  • #13376
    Profile photo of Garth Jones
    Garth Jones
    Participant

    Hi Oliver, did you ever figure this out?

  • #13400
    Profile photo of Oliver Adams
    Oliver Adams
    Participant

    Hi Garth,

    You can find a copy of the script here: https://powershell.org/forums/topic/invoke-webrequest-powershell-2-0/

    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.

You must be logged in to reply to this topic.