/build/static/layout/Breadcrumb_cap_w.png

Mac OS X Custom Inventory Return Warranty Information

Here is a way to leverage Apple's support site and return the warranty information of an OS X system:

Download the warranty.sh script from GitHub https://github.com/rustymyers/warranty

Add a new Software item (I called mine 'Warranty Check')

Create a File Sync job to push the script to Macs (usr/local/bin is pretty safe)

 

 

This results in a Custom Inventory Return that shows the current warranty information. 

 

 

 


Comments

  • This is awesome. It looks like the file is now warranty2.sh. I set this up as per your instructions and I noticed that the file is being pushed to my Macs. However, no information is being placed in the custom inventory. Is this an automated process once configured, or do I need to run something to collect the data for the inventory? - ems296 10 years ago
  • It will take a couple of inventory runs to both sync the file and run the CI while the file is present. :\ - MacDude 10 years ago
    • I have successfully synched the file and have forced an inventory three times at this point on my test Mac. The Custom field still has not populated, any ideas? - deldan 10 years ago
      • Chek to verify that the script is found on the system and that the Custom Inventory is correctly calling the script. Any typos (including case sensitive changes) will prevent the action from happening.

        Another thing to test is to run the script on the machine and verify that the results are valid.

        $/bin/bash /usr/local/bin/warranty.sh

        Should return the appropriate output. - MacDude 10 years ago
      • You can test Custom Inventory as a test on the local machine by running:
        $sudo /Library/ApplicationSupport/Dell/KACE/bin/kdeploy --custominventory - MacDude 10 years ago
    • The custominventory check returned:
      [ExecuteCustomInventoryRule] rule [FS1] statement result: ;FS1, TRUE

      The script is found on the system and running $/bin/bash /usr/local/bin/warranty.sh returns:

      grep: /tmp/asdcheck.1401304121.txt: No such file or directory
      Wed May 28 15:08:43 EDT 2014 ... Checking warranty status
      Serial Number == xxxxxxxxxxx
      WarrantyExpires == xxxxxxxxxxxxx
      WarrantyStatus == AppleCare Repair Agreement
      ModelType == iMac (27-inch, Mid 2011)
      ASD ==
      rm: /tmp/asdcheck.1401304121.txt: No such file or directory

      The x's above are replacing legitimate data.

      Thanks a lot! - deldan 10 years ago
  • It finally ran for me after a few cycles as you noted. - ems296 10 years ago
  • Looks like the script was updated to warranty2.sh before I downloaded and tested this. I'm getting errors in running the script, though:

    /usr/local/bin/warranty2.sh: line 6: syntax error near unexpected token `newline'
    /usr/local/bin/warranty2.sh: line 6: `<!DOCTYPE html>'

    Any ideas? - dgretch 10 years ago
    • Yeah i'm getting that error now too. running Yosemite - brucegoose03 10 years ago
      • still not working goose? :-) - Ozhunna 5 years ago
  • This appears to be failing for me. It looks like not only did apple change the url but also has employed a captcha. Anyone have suggestions? - PRTejeda 9 years ago
  • checking....

    Ugh. the captcha is a killer. - MacDude 9 years ago
    • Posted to Apple here: https://discussions.apple.com/message/29299722#29299722 - MacDude 9 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ