powershell: retrieving warranty data
...or as dell would say ... "entitlements".
first of all, check this out: http://xserv.dell.com/services/assetservice.asmx. dell has a webservice that you can use to pull down warranty information on your system. there are three arguments you have to provide to make this work:
guid
the easiest way to generate a guid is by using the newguid() method as such:
application name
service tag
first of all, check this out: http://xserv.dell.com/services/assetservice.asmx. dell has a webservice that you can use to pull down warranty information on your system. there are three arguments you have to provide to make this work:
- guid
- application name
- service tag
the only key piece of information is the service tag. the other two arguments will accept any piece of data as long as it's the right type. let's examine each of these for a quick second.
guid
the easiest way to generate a guid is by using the newguid() method as such:
$guid = [guid]::parse("11111111-1111-1111-1111-111111111111")
application name
set this to whatever string value strikes your fancy. (do people say that anymore?)
this is the part actually drives the context. provide your service tag (some call it asset tag, some call it serial number, etc) as the third argument and away you go. if you want to pull the service tag from your system, you could do it like this:
$servicetag = get-wmiobject win32_systemenclosure | select serialnumber
now that you have all of the pieces together, here's how you'd put it together (watch wordwrap):
$guid = [guid]::newguid()$servicetag = get-wmiobject win32_systemenclosure | select serialnumber$dell = new-webserviceproxy 'http://xserv.dell.com/services/assetservice.asmx'$dell.GetAssetInformation($guid, "script", $serial) | select -expand entitlements
when you run it, it looks like this:
ServiceLevelCode : CC
ServiceLevelDescription : P, COMPLETE CARE
Provider : DELL
StartDate : 9/17/2012 12:00:00 AM
EndDate : 9/18/2015 12:00:00 AM
DaysLeft : 813
EntitlementType : Active
Comments
Post a Comment