Dell Warranty Info
Edit (09/06/11): There was an error in DellWarrantyInfoFunction.psm1 file that would not correctly address extended warranties. You can download the new file here. The main zip file has been updated as well.
A few days ago I needed to look up the warranty information for one of my Dells only to find that dell had changed their website again (thus breaking all my data). Since all of the community scripts before have been html scrapers I set out to see if someone had created a new version. I did not find a new version but I did find out that dell has setup a webservice (http://xserv.dell.com/services/assetservice.asmx).
Using this new webservice I have created a Powershell module that exports the command : Get-DellWarranty. The new command makes it very easy to either look up machines on the fly or create scripts that use this new function. To actually regain the reporting that was damaged with the loss of the previous script I have created two additional scripts that use this module.
All of the files can be downloaded here: DellWarrantyInfo.zip
DellWarrantyInfo.ps1
The first script DellWarrantyInfo.ps1 is a replacement to the community script that some people have been using. This script will use Get-DellWarranty and store the information in WMI so that it can be picked up by HW INV in ConfigMgr. This script will obviously have to be run elevated on each client. Your MOF will have to be updated even if you used a previous community script as variables types have been changed.
Usage
- Create a package that contains DellWarrantyInfo.ps1 and DellWarrantyInfoFunction.psm1
- Create a program that runs: powershell.exe -NoProfile -NonInteractive -File DellWarrantyInfo.ps1
- Create the report with SQL code in DellWarrantyInfo_Report.txt
- Add (or replace) the following to your sms_def.mof (this is also in the comments of the file):
// <:[-<>>>>>>>>>>>>>>>>>>>>>>Begin>>-Warranty Info-<<Begin<<<<<<<<<<<<<<<<<<<<<<>=]:>
#pragma namespace ("\\\\.\\root\\cimv2\\SMS")
[ SMS_Report (TRUE), SMS_Group_Name ("Warranty Info"), SMS_Class_ID ("CUSTOM|Warranty_Info|4.0") ]
class Warranty_Info : SMS_Class_Template
{
[SMS_Report(TRUE)] datetime DateScriptRan;
[SMS_Report(TRUE)] string ServiceTag;
[SMS_Report(TRUE)] string SystemType;
[SMS_Report(TRUE)] datetime ShipDate;
[SMS_Report(TRUE)] string DellIBU;
[SMS_Report(TRUE), Key] string Description;
[SMS_Report(TRUE)] string Provider;
[SMS_Report(TRUE)] datetime StartDate;
[SMS_Report(TRUE)] datetime EndDate;
[SMS_Report(TRUE)] uint32 DaysLeft;
[SMS_Report(TRUE)] boolean WarrantyExtended;
};
// <:[-<>>>>>>>>>>>>>>>>>>>>>>End>>-Warranty Info-<<END<<<<<<<<<<<<<<<<<<<<<<>=]:>
DellWarrantyInfoSQL.ps1
edit (08/12/11): Marcus Oh has a more network friendly version of this file here: http://marcusoh.blogspot.com/2011/08/sccm-integrating-dell-warranty-data.html
The second script DellWarrantyInfoSQL.ps1 will get the warranty info for all of the systems in the database and create a new table with that info. This is much faster and complete than the hardware inventory version. The script has to be run from a user that has read and write access to the ConfigMgr database. The script will only add and edit the table it creates, no other data is changed. I personally use this script over the hardware inventory version.
Usage
- Using a user who has write and read access on the ConfigMgr database type this into Powershell: .\DellWarrantyInfoSQL.ps1 -SqlServer <server> -SiteCode <sitecode>
- Create the report with SQL code in DellWarrantyInfoSQL_Report.txt
The reports for both scripts will look similar to this:
