Skip to main content
Solved

Warranty End Extension Attribute

  • August 28, 2012
  • 8 replies
  • 28 views

Forum|alt.badge.img+4

This is in reference to the previous thread here, https://jamfnation.jamfsoftware.com/discussion.html?id=4270 . I believe this has been working fine, but currently none of my systems are showing warranty end dates. Is Apple's site just down temporarily? Tried putting the URL in manually using a good serial number and I get "We're sorry, our system is not available at this time.". I'm just hoping this is temporary.

On a related note, is there a good method of retaining historical information on extension attributes and other data? For example, if I had a weekly report that gave me all of this info, today I could go to a previous report to find the warranty end dates of all my systems...

Thanks!

Best answer by rockpapergoat

apple changed the format and output from selfsolve.apple.com.

check this for a working implementation in python: https://github.com/pudquick/pyMacWarranty

or this in ruby: https://github.com/glarizza/scripts/blob/master/ruby/warranty.rb

my methods of parsing selfsolve output cached the results to /etc, so any future runs of the script used to populate the extension attribute didn't actually have to do a lookup unless something changed.

8 replies

Forum|alt.badge.img+13
  • Contributor
  • Answer
  • August 28, 2012

apple changed the format and output from selfsolve.apple.com.

check this for a working implementation in python: https://github.com/pudquick/pyMacWarranty

or this in ruby: https://github.com/glarizza/scripts/blob/master/ruby/warranty.rb

my methods of parsing selfsolve output cached the results to /etc, so any future runs of the script used to populate the extension attribute didn't actually have to do a lookup unless something changed.


Forum|alt.badge.img+4
  • Author
  • Contributor
  • August 31, 2012

I was able to just add the <result></result> to your ruby script to get exactly what I needed. Thank you so much!


Forum|alt.badge.img+6
  • New Contributor
  • February 15, 2013

jwelsh, would you mind sharing how you modified the ruby script? Not knowing Ruby, I've tried a couple of options but am getting an empty result.

Thanks!


Forum|alt.badge.img+11
  • Contributor
  • April 8, 2013

+1 on how to integrate to JSS extension attribute. Could just echo on shell/bash, but Ruby? Tried a few obvious options and no luck

result = get_warranty(serial)
  print "<result>$result</result>"

Nope.


Forum|alt.badge.img+6
  • Contributor
  • January 31, 2014

Simply put:

puts "<result>" + result + "</result>"


jhbush
Forum|alt.badge.img+27
  • Esteemed Contributor
  • January 31, 2014
puts "<result>"+ (warranty_status ? "#{expiration_date}" : 'Expired') +"</result>"

returns <result>December 10, 2016</result>


Forum|alt.badge.img+4
  • Contributor
  • October 10, 2017

is this script working for anybody ?I have added the script to the EA but unable to display the results.

can someone please advise


Forum|alt.badge.img+4
  • Contributor
  • January 18, 2018

That script is not working anymore since Apple added a Captcha on the checkwarranty site.. Currently there is no way to populate Warranty info without GSX it seems.