You could do it using the Model Identifier instead. You'd have a bunch of identifiers to roll through, but it would probably be more accurate than using just the year.
I set up a test with the criteria set to:
Model Identifier IS MacBookAir3,2
OR Model Identifier IS MacBookAIr4,1
OR Model Identifier IS MacBookAir4,2
And it located the machines in our inventory that fit that. For your criteria you'd probably want it to be IS NOT, obviously.
Forgot to mention, you can use the app Mactracker (available in App Store for free) to pull up the identifiers for each model.
If you have GSX integration set up you can search Purchasing Info -> PO Date before 2010-04-16 to get a list of everything purchased more that 4 years prior to today.
Using the year of the model string will be the least reliable or accurate. Using the model identifier is better, but still not accurate. For example, I use a Late 2011 MacBook Pro, but I didn't get my Mac until Spring of 2012 since Apple had that model in their lineup for awhile before it got replaced with a newer version. So using my model identifier would peg my Mac at close to 2 1/2 years old now, when in fact its only been "used" for about 2 years. So I guess it all depends on what you consider to be the age of a Mac. I personally would consider it to be the time its been used since it was purchased/unboxed/setup, etc.
The most reliable would be what @chris.kemp stated, using GSX, if that's an option for you.
If that isn't an option, you may need to go the model identifier route and just understand that it will never be 100% accurate.
@mm2270 I could make the argument that the purchase date isn't the end-all, determining factor where computer age is concerned. Like it or not, that's still a 2011 Mac in terms of performance (assuming minimal degradation of performance owed to wear), so it'll still "feel old" whether purchased in October 2011 or April 2012 at or around the same time.
Of course, it depends on how you're using the information. If you're just notifying customers that their system is aging out of warranty, then the buy-date is critical. If you're planning equipment lifecycle, you want model years, not birthdays.
Thanks all. Setting up a GSX connection in the UK is very hard as there as so many resellers. I'll see what i can do with the model identifier.
@JPDyson - yeah, that's why i said it all depends on what you consider to be the age of the Mac, or what the purpose is of grabbing this information. I'll admit my Mac is feeling very much like a 2011 Mac at this point, and am angling for an upgrade to a shiny new 2013 model, or, maybe I'll just wait for a new 2014 model to ship. :)
Hello,
To fetch the manufacture date of mac. Any one created extension attribute without integrating to GSX on JAMF.
Thanks
Check out this:
https://www.jamf.com/jamf-nation/discussions/21504/aged-out-macs
It's what we've been using a few years now, it's pretty accurate