Include Lenovo Warranty Information in the SCCM Hardware Inventory

Posted: May 14, 2013 in Configuration Manager, System Center Configuration Manager 2012
Tags: , ,

I’m currently working on a Configuration Manager 2012 SP1 deployment for a customer and they wanted to be able to take out reports on warranty information on their Lenovo machines. I did a search to see what’s out there, but could not find anything for Lenovo machines that actually stored the Warranty Information in SCCM. I however found a lot of reports that would include a link to the Lenovo website so you could go out and check warranty information for that specific computer, but that’s not what we wanted, we wanted to be able to generate reports based of data stored in SCCM.

I found a nice blog post that Eric Schloss wrote that does the exact ting I want for HP machines. So we ended up creating a script based on the script in the article above, but modified it to use the Lenovo Warranty website and the information needed for Lenovo machines.

There is one thing to be aware of before we begin. This process is dependent on the output from a Lenovo web site. If Lenovo updates the format of the output from the site, it could affect the processing of the data.

To describe the process of how this works in short:

  1. Run the script on the computer to pull the warranty information and store it in the registry (We included the script to run in the Task Sequence when we deploy machines, but you could also run this as an application or program to already installed computers)
  2. Modify Configuration.mof and add the Hardware Inventory Classes
  3. Create a report that uses the information collected through Hardware Inventory

You can download the script here; Warranty_Lenovo.zip

The script logs its results to C:\Windows\Temp\WarrantyInfo.log

1

And the information is stored in the registry.

2

To extend the inventory of the registry, there is a great tool (RegKeyToMOFv31.exe) to download from here

Start the tool and select the registry keys you would like to add to the inventory.

Copy the syntax from the tool and paste into the “Added extensions” section of the configuration.mof located on the SCCM primary server install directory\Microsoft Configuration Manager\inboxes\clifiles.src\hinv (make a copy of the original file before you edit and save it).

Select the “to import in Admin/Agent settings….” tab of the tool and save the information to a .mof file.

After that go to the SCCM console, Administration -> Client Settings -> Hardware Inventory -> Set Classes and then click Import..

Select the file you just created and verify that the new classes are added.

Run a hardware inventory action on a client and verify that the new registry values are added to the inventory.

3

Now that the information is added to the inventory you can start to create reports that leverage this information, below is a basic report to give you an idea of what this could look like;

4

Update 1:

I’ve been contacted regarding the script that Eric Schloss have on his site for HP machines on his site, because that script is not working anymore. The reason for that is that HP has changed the Warranty lookup website since that article was published.

So I’ve also made a updated script for HP machines available that you can grab here; Warranty_HP.zip

Update 2:

I’ve also been asked if I could share the sample report from the posting, so I’ve made the query available for download here; ReportQuery.txt

This is a bit modified from the sample included in the original post and here is a screenshot for that. (The modification will make it easier to create pie-charts etc.

You’ll need to update the query to match your tables/views for this query to work, this is the name of the view used for Warranty Information in my setup so you must change this to match your setup; dbo.v_GS_WarrantyInformation0

The code will provide you with the table and then you can use information from there to build pie-charts etc.

Report

About these ads
Comments
  1. Jan Fernand Bosløven says:

    Tnx m8…. Nice one;-)

  2. Josiah says:

    Can you include that sample report? I’ve gotten everything to work but I’m having issues with the reporting aspect. Thanks!

  3. Any chance you have w Warranty_Dell.zip?

  4. Andrew Morris says:

    I am trying your report query and I am getting errors saying ‘conversion failed when converting date and/or time from character string.’
    So that’s the bit in your query that converts the warranty expiration dates in the table to a number of days remaining or working out the warranty status.
    Any idea on how I might fix this?

  5. Marino says:

    Hi,
    Any update on with Lenovo warranty.zip.It would be great if you get it to work.

  6. Dan Clark says:

    Looks like HP has modified their warranty lookup page, which breaks this process. Has anyone found a solution for pulling warranty data from HP via script?

  7. Arsalan says:

    The report is not pulling any information since it is not looking into 64 bit key, what would be the query to lookup warranty information stored in 64 bit location…

  8. Paul Murray says:

    Odd-Magne Kristoffersen :
    Yes, HP has modified the warranty lookup page. I’m working on a new script/solution for this now. 95% finished just some testing left. I’ll try and post an updated version this weekend.

    Have you updated the HP warranty lookup script?

  9. Costa says:

    I can’t thank you enough for both of this scripts. They are an amazing help. I’m not sure if you ran into this on your testing, but i thought i should mention it .Some Lenovos have upgraded warranty, and the warranty date is different from the upgraded warranty date, so the data pulled from the website is the expired warranty. See link below.

    Besides that, the other problem i had was like the guy above (Andrew Morris) and it turned out to be a bad date field ( it was set to dd-mm-yyyy), field was probably created because computer is outside of US. So i just modified the SQL query to ignore it.

    Thanks again for creating these.

  10. John Bryntze says:

    Thanks a lot for sharing this, it looks excellent, need this myself.

  11. Dayat Rambo says:

    There is one thing to be aware of before we begin. This process is dependent on the output from a Lenovo web site. If Lenovo updates the format of the output from the site, it could affect the processing of the data.

  12. […] Last year blogged about how to add Lenovo and HP warranty information to Configuration Manager 2012, you can find this blogpost here. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s