← Blog |

Warranty Reporting for Intune

By John Marcum

Warranty Reporting for Intune

For quite some time we have had warranty reporting for Dell, Lenovo, and GETAC devices. We used to also support Microsoft devices but, unfortunately, both Microsoft and HP have taken their warranty API’s offline. We have chosen not to bring this functionality into Intune as we expect that Microsoft will add it natively to Intune soon. However, some customers need the data now, so we are providing this solution as a work-around until we see what the native Intune warranty information looks like once it is released.

We aren’t going to pretend this is a complete, robust solution but it will give you the warranty end date in a report. Hopefully this is helpful while we wait for Microsoft to bring us a better solution.

**Note:**The script has code in it to collect warranty data for Microsoft devices however Microsoft has taken their API offline. Prerequisites:

  1. Dell requires an API token in order to access their warranty API. You must apply for the token at https://techdirect.dell.com/Portal/APIs.aspx
  2. Lenovo requires a client token in order to access their warranty API. Getting the token from Lenovo can be a bit more difficult than getting a token from Dell. You will need to have your Lenovo account rep request a key on your behalf.

The script(s) referenced above are available on GitHub:

github mark2

Get the scripts on GitHub: powerstacks-corp/Windows-Custom-Inventory

1. Edit the Script

  1. Copy the PowerShell script from above into your favorite code editor.
  2. Enable or disable each of the manufacturer’s warranty collection in the Enable Warranty Vendors section by entering either $true or $false.
  3. If applicable enter the Dell Client ID and Client Secret values. When you retrieve this info from TechDirect it will be in a format similar to xxxxxxxxxx (yyyyyyyyy). The part before the opening parenthesis is the Client ID, the part inside the parenthesis is the Client Secret. (Note: Do not enter the parenthesis themselves in the script)
  4. If applicable enter the Lenovo Client ID provided to you by your Lenovo account rep.
  5. Ensure the saved script is encoded in UTF-8.
  6. Save the edited script.

2. Create a Remediation Script

  1. Using Remediation scripts in Intune is a great way to run any scripts on a schedule. However, unless you extend warranties this script only needs to run once on each computer. This document shows how to use a Remediation script but using a Script in Intune is also feasible.
  2. In the Intune admin center, go to Devices > Remediations.
  3. Choose Create script package button to create a script package.
  4. n the Basics step, give the script package a Name and optionally, a Description.
  5. Select Next.

3. Upload the Script

  1. On the Settings step, upload the warranty script as the Detection script.
  2. No Remediation script will be used.
  3. Select Yes on the Run script in 64-bit PowerShellslider.
  4. Select Next.
  5. Selecting Scope Tags is optional.
  6. Select Next.

4. Deploy the Script

  1. On the Assignments pane, select the group(s) to which you want to deploy the script package.
  2. Select the Schedule that you would like to run the script. Once is acceptable for most customers.
  3. You can also use filtersto limit the script to running only on devices manufactured by the vendor(s) for which you want to collect warranty data.
  4. Select Next.
  5. Select Create.

5. Take a Break

  1. Wait some time for devices to run the script and return data.
  2. Ensure that a refresh cycle has run in Power BI.

6. Duplicate the Proactive Remediations Page

  1. Open your BI for Intune report.
  2. Go to Edit mode.
  3. Select the Proactive Remediations page.
  4. Right click the Proactive Remediationstab.
  5. Select Duplicate.

7. Rename the New Page

  1. Right click the new page tab.
  2. Select Rename.
  3. Enter a name for the new page.

8. Add Filters to the Warranty Page

  1. On the Filters pane add apage filter for Script Package Name and select your warranty script remediation package.
  2. Add any other filters that you find necessary.

9. Customize the Warranty Page

  1. You might want to customize the warranty page to make it easier to consume.
  2. The script will output the warranty end date as the “Pre Remediation Script Output”. You can see this in the table on the page.
  3. In this example I’ve removed some of the unnecessary visuals and renamed the “Pre Remediation Script Output” field in the table to “Warranty End Date”.
  4. Save your report and return to reading view.

Want comprehensive device reporting beyond warranty data? BI for Intune provides pre-built Power BI dashboards for device inventory, compliance, app deployments, Windows Updates, proactive remediations, and more — all in one place. Start a free trial →

BlogIntunePower BI