Posted on 08-28-2012 08:28 AM
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!
Solved! Go to Solution.
Posted on 08-28-2012 10:12 AM
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.
Posted on 08-28-2012 10:12 AM
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.
Posted on 08-31-2012 08:54 AM
I was able to just add the <result></result> to your ruby script to get exactly what I needed. Thank you so much!
Posted on 02-14-2013 04:34 PM
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!
Posted on 04-08-2013 09:30 AM
+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.
Posted on 01-30-2014 04:55 PM
Simply put:
puts "<result>" + result + "</result>"
Posted on 01-30-2014 05:49 PM
puts "<result>"+ (warranty_status ? "#{expiration_date}" : 'Expired') +"</result>"
returns <result>December 10, 2016</result>
Posted on 10-10-2017 09:55 AM
is this script working for anybody ?I have added the script to the EA but unable to display the results.
can someone please advise
Posted on 01-18-2018 11:42 AM
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.