Skip to main content

Grab Dell Warranty Date on Dell Devices

This script will grab the warranty end date based on a server’s/laptop’s/PC’s asset tag number and then, it will create a file on your C drive named warranty.txt
You can modify the behaviour as needed. Just create a new file and put the code in it, then rename it to warrantycheck.vbs.
This is usefull for massive checks on servers and workstation or Labtech automation

[code lang=”vb”]
Option Explicit
Dim SoapRequest
Dim url, regkey, svctag
Dim warrantyRows, warrantyCols
Dim objShell, objXML, objWMI, objHTTP, NodeList
Dim i, result
SoapRequest = "<?xml version=""1.0"" encoding=""utf-8""?> <soap:Envelope xmlns:xsi="""" xmlns:xsd="""" xmlns:soap=""""> <soap:Body> <GetAssetInformation xmlns=""""> <guid>11111111-1111-1111-1111-111111111111</guid> <applicationName>Warranty Information Lookup</applicationName> <serviceTags>!SERVICETAG!</serviceTags> </GetAssetInformation> </soap:Body></soap:Envelope>"
url = ""
regkey = "HKEY_LOCAL_MACHINE\Software\DellWarrantyInfo"
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 Dell malaka"
svctag = Trim(objWMI.ExecQuery ("Select SerialNumber from Win32_BIOS").ItemIndex(0).SerialNumber)
SoapRequest = Replace(SoapRequest, "!SERVICETAG!", svctag)
Set objHTTP = CreateObject("Msxml2.XMLHTTP") "POST", URL, false
objHTTP.setRequestHeader "Content-Type", "text/xml"
objHTTP.setRequestHeader "SOAPAction", ""
objHTTP.send SoapRequest
result = objHTTP.responseText
Set objXML = CreateObject ("Msxml2.DOMDocument")
objXML.LoadXml result
If not objXML.SelectSinglenode ("//faultstring") is nothing then
Err.Raise 1, "Error:" & objXML.SelectSingleNode("//faultcode").text, Trim(objXML.SelectSingleNode("//faultstring").text)
End If
Set NodeList = objXML.SelectNodes("//Asset/Entitlements/EntitlementData")
set warrantyCols = NodeList.item(0)
dim filesys, filetxt, getname, path
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.CreateTextFile("c:\warranty.txt", True)
path = filesys.GetAbsolutePathName("c:\warranty.txt")
getname = filesys.GetFileName(path)
filetxt.WriteLine(Mid(warrantyCols.SelectSingleNode("EndDate").text,1,10) & " (" & svctag & ")")

Connectwise Analytics

This project was done on my spare time mostly, for the company I work for. It digs into the connectwise and labtech databases pulling interesting data, presenting them in a nice jquery way. Ideal for your NOC board monitors or your management executive boards / meetings.

Here are some screenshots (company names and technicians’ names are blanked :

I am tempted to release this as opensource. I would love to get some beta testers. The only thing you need to run it on your server is php,mssql extensions and a read only user for labtech and connectwise (or only connectwise.) All configuration is done on a single config file.