This might be better off in the Web Reports section, but it does have to do with Inventory Management.
Is there a report which querries the Dell Support site for Warranty information?
Open-Audit has a script which does this, and I think it would be awesome if BigFix could take the Service Tag/serial#, plug it into a URL, search the text and return the warranty date.
I think that some businesses would love to be able to track warranty info within Bigfix verses external Excel spreadsheets for databases.
To the best of my knowledge, such a report does not exist for BigFix.
I’ve looked at ways to do this and the best way I could come up with is screen scraping the results of the Dell Warranty web page. Of course, this is somewhat tedious. I wrote a scraper a while ago in .NET with the help of the HTMLAgilityPack. It usually breaks every time they change the format of the page.
I’ve asked a few people from Dell if there is a more reliable method for querying warranty information and they’ve never come back with anything. If anyone finds a better way to query Dell warranty info, please share.
Something my group has considered doing (at least for servers) is storing the warranty info we are interested in right in the registry on the machine in some custom keys. Then we can either pull it out from each machine with BigFix, or with System Center Ops Manager.
It’s not like it changes
that
often, and keeping it close to the server (on the server) makes it really handy, as long as you have a standard was to store it, and everyone is aware of it.
Alright, I was bored tonight and wanted to see how easy this was to do with VBScript. It turns out that it’s not too hard. The attachedl script will parse the warranty information and put it into HKLM\Software\DellWarrantyInfo
You can then query the information using this relevance:
(values
"description" of it, values
"provider" of it, values
"start date" of it, values
"end date" of it) of keys of key
"HKLM\Software\DellWarrantyInfo" of
native registry
As Jack mentioned, this is a community contribution, not provided by BigFix. I don’t know what happened to the attachment, but here’s the actionscript, just in case anything should ever happen to my site:
createfile until ENDOFFILE
'=====================================================================
' Dell Warranty Grabber
' Author: Matthew Boyd (iboyd.net)
' Date: 3/25/2010
'
' This is an example of how to query the Dell website for
' Warranty Information and parse the HTML source.
' values are then written to the registry of the local
' computer.
'
' Usage: cscript.exe DellWarrantyGrabber.vbs
'
' Note: This must be run under an account with admin rights.
' This script is provided AS IS with no support or warranties.
' Use at your own risk!
'===================================================================== Option Explicit Dim url, regkey, svctag Dim warrantyRows, warrantyCols Dim objShell, objIE, objWMI Dim i, result url =
"http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&cs=RC956904&l=en&s=hied&~lt=bodyonly&~wsf=tabs&servicetag=" regkey =
"HKEY_LOCAL_MACHINE\Software\DellWarrantyInfo" set objIE=createobject(
"internetexplorer.application") set objShell = WScript.CreateObject(
"WScript.Shell") set objWMI = GetObject(
"winmgmts:{{impersonationLevel=impersonate}!\\.\root\cimv2") If InStr(UCase(objWMI.ExecQuery(
"Select Manufacturer From Win32_ComputerSystem").ItemIndex(0).Manufacturer),
"DELL") = 0 then Err.Raise 2,
"This is not a Dell dude!",
"No Service Tag" svctag = objWMI.ExecQuery (
"Select SerialNumber from Win32_BIOS").ItemIndex(0).SerialNumber result = objShell.Run(
"reg.exe delete '" & regkey &
"' /f",
true) If not result = 0 then Err.Raise result,
"Unable to delete registry key!",
"Code " & result result = objShell.Run(
"reg.exe create '" & regkey &
"' /ve",
true) If not result = 0 then Err.Raise result,
"Unable to delete registry key!",
"Code " & result objIE.navigate url & svctag
do
while objIE.readystate4 : wscript.sleep 50 : loop set warrantyRows = objIE.document.getElementsByTagName(
"table").item(1).getElementsByTagName(
"table").item(2).getElementsByTagName(
"table").item(0).getElementsByTagName(
"tr") For i = 1 to warrantyRows.length - 1 set warrantyCols = warrantyRows.item(i).getElementsByTagName(
"td") wscript.echo warrantyrows.item(i).innerText objShell.regWrite regkey &
"\" & i & "\
", "
" objShell.regWrite regkey &
"\" & i & "\Description
", warrantyCols.item(0).innerText objShell.regWrite regkey &
"\" & i & "\Provider
", warrantyCols.item(1).innerText objShell.regWrite regkey &
"\" & i & "\Warranty Extension Notice
", warrantyCols.item(2).innerText objShell.regWrite regkey &
"\" & i & "\Start Date
", warrantyCols.item(3).innerText objShell.regWrite regkey &
"\" & i & "\End Date
", warrantyCols.item(4).innerText objShell.regWrite regkey &
"\" & i & "\Days Left
", warrantyCols.item(5).innerText Next ENDOFFILE copy __createfile DellWarrantyGrabber.vbs waithidden cscript DellWarrantyGrabber.vbs
Jack, I agree about the screen scrapers. Unfortunately, there isn’t a better way to do this. In fact, I’m 99% sure that the Dell’s own management console (DMC) uses a scraper to get warranty information. According to their community site, it’s broken a few times.
Dell recently added a column to their warranty information table, which caused the script to retrieve incorrect values for start date, end date, and days left. I updated the script in post #8 (http://forum.bigfix.com/viewtopic.php?pid=24790#p24790) to fix that.