2011-07-11: This method is now deprecated please go here: http://ninet.org/2011/07/dell-hp-warranty-info-in-sccm
LAST UPDATED: 2010-09-22
UPDATE 2010-09014: Dell have changed the layout to add an extra field in the contracts section so the scripts are broken
Version 2: work around for computer account that can’t access the internet http://ninet.org/2010/03/sccm-get-dell-warranty-info-v2/
I found a script and mof edit here: Sherry Kissinger’s Blog at myitforums.com
However when I tried it, it was completely broken all the data being returned in the wrong place. So I have rewritten it so that it is more modular and hopefully easier to maintain.
Now a bit of a disclaimer, my vbs skills are very rusty so the script works though it probably isn’t very efficient. So if you can suggest improvements please do and I’ll update the script as needed.
Although the code is long most of it is comments and “wscript.echo” statements for debugging, feel free to strip them out if you want something more compact.
I have also added the ability to dump the results to a csv file that you can collect with SCCM if you don’t want to capture from WMI.
- If you have used older versions of this script then you might need to change “v_gs_warranty_info0” to “v_gs_warranty_info1” or some other number.
- If you get the error: “Object Name ‘v_gs_Warranty_Info0′ invalid.” It is likely your computer accounts cannot access the internet in order to download the data and insert it into WMI. Two ways to id this problem:
1. On a client the script has been run on, open wbemtest -> Connect to “root\cimv2” and open the Class “Warranty_Info”. If there is no class then the script has either bailed due to afore mentioned problem or hasn’t been run as admin and so hasn’t got permissions to update WMI.
2. Enable logging in the script, redeploy the script and look in the log file to see where it stops, this is the prefered method.
Version 0.5 – 2010-09-22
- Updated to account for Dell adding an extra field to the warranty table
Version 0.4 – 2010-03-17
- Removed useless code (SMS reporting and deleteWMI root\cimv2\SMS)
- Added Logging to file, disabled by default.
- [download id=”2″]
- [download id=”3″]
// <:[-<>>>>>>>>>>>>>>>>>>>>>>Begin>>-Warranty Info-<<Begin<<<<<<<<<<<<<<<<<<<<<<>=]:>
#pragma namespace ("\\\\.\\root\\cimv2\\SMS")
[ SMS_Report (TRUE),
SMS_Group_Name ("Warranty Info"),
SMS_Class_ID ("CUSTOM|Warranty_Info|3.0") ]
class Warranty_Info : SMS_Class_Template
[SMS_Report(TRUE)] string DateScriptRan;
[SMS_Report(TRUE)] string ServiceTag;
[SMS_Report(TRUE)] string SystemType;
[SMS_Report(TRUE)] string ShipDate;
[SMS_Report(TRUE)] string DellIBU;
[SMS_Report(TRUE), Key] string Description;
[SMS_Report(TRUE)] string Provider;
[SMS_Report(TRUE)] string StartDate;
[SMS_Report(TRUE)] string EndDate;
[SMS_Report(TRUE)] uint32 DaysLeft;
[SMS_Report(TRUE)] string WarrantyExtended;
// <:[-<>>>>>>>>>>>>>>>>>>>>>>End>>-Warranty Info-<<END<<<<<<<<<<<<<<<<<<<<<<>=]:>
wi.datescriptran0 AS [Timestamp data gathered],
wi.ServiceTag0 AS [Service Tag],
wi.SystemType0 AS [System Type],
wi.provider0 AS [Provider],
wi.shipdate0 AS [Ship Date],
wi.Description0 AS [Description],
wi.Startdate0 AS [Warranty Start Date],
wi.Enddate0 AS [Warranty End Date],
wi.DaysLeft0 AS [Warranty Days Remaining],
wi.WarrantyExtended0 AS [Warranty Extended],
wi.dellIBU0 AS [Dell IBU]
FROM v_r_system as [SYS]
JOIN v_gs_Warranty_Info0 AS [WI]
ORDER BY sys.netbios_name0