Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

How to track computer's warranty

Hi,

Could you help me to track warranty of computer using PDQ inventory. Is there any way where I can add static custom data like Warranty date of computer along with PDQ auto scan data. It will help me to track warranty parameter as well in enterprise environment.

0

Comments

3 comments
Date Votes
  • I am doing this manually. I created a custom field for Purchase Date (which is based on the warranty expiration date) and imported the data from anther source. Part of our process is to manually enter this information as we bring new computers online. I would be interested to hear if anyone has come up with an automated process for this.

    0
  • Automating this process requires "warranty API", check if your hardware vendor offers it

    HP https://developers.hp.com/hp-client-management/doc/get%E2%80%90hpwarranty-0

    Lenovo (WebAPI.Warranty) http://supportapi.lenovo.com/Documentation/Index.html

    Dell https://www.programmableweb.com/api/dell-warranty-status

    Some code example: https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-Get-Dell-d7fd6367 https://gist.github.com/shinjijai/86b01bf18f6c2ee5e26c855b66aa8c54

    The easiest way to automate this process is to pull the JSON response from the warranty API -> Get warranty $date_string out -> Store $date_string into "AD Description"

    0
  • Yesterday I played around with pulling in Lenovo warranty expirations as a PDQ Inventory tool. I wanted to avoid using WMI queries because often times I need to know the warranty expiration of a system that is dead/offline. Save the script below and reference the .ps1 file with PDQ system variables as the parameters.

    Param (
     $CompName,
     $Serial
    )
    Process {
    	$serialnumber = $Serial
    	$URL = “https://csp.lenovo.com/ibapp/il/WarrantyStatus.jsp?serial=	$($SerialNumber)”
    	$WebRequestResult = Invoke-WebRequest -Uri $URL
    	$TDTagNames = $WebRequestResult.ParsedHtml.getElementsByTagName('Body')
    
    foreach ($TDTagName in $TDTagNames)
    	{
    	$ComputerName = $CompName
    	$SerialNumber = $Serial
    	$Year = $TDTagName.innerText.substring($TDTagName.innerText.IndexOf(“ActiveEnd Date: “) + “ActiveEnd Date: “.Length,10)
    }
    $PSObject = [PSCustomObject]@{
    Name = $ComputerName
    SerialNumber = $SerialNumber
    ExpirationDate = $Year
    }
    Write-Output $PSObject
    }
    

    Here is the CMD I use as a PDQ Inventory tool:

    powershell -executionPolicy bypass -noexit -file <PATH\LenovoWarranty.ps1> -CompName "$(Computer:TARGET)" -Serial "$(Computer:TARGETSERIALNUMBER)"
    
    0