MacOS Sonoma Hardware Compatibility regex

Eltord
Contributor

Its that time of year again!

I've modified my regex statement to take out the models that were tragically lost this year to the latest macOS version. RIP 2017 MacBook Pro and iMacs.

I've also added in some bug fixes, mainly that it wasn't matching the full line if the last number after the comma in the model identifier was a double digit (as Apple added one this year for the first time), and gave myself some wiggle room in all the other models in case Apple continues to add more double digit identifiers down the line:

 

 

(^Mac1[3-9],\b[0-9]{1,2}\b|MacBook\d{2}|MacBookAir([8-9]|\d{2}),[1-9]|Macmini[8-9],\b[0-9]{1,2}\b|MacPro[7-9],\b[0-9]{1,2}\b|iMacPro[1-9],\b[0-9]{1,2}\b|iMac(19|2[0-9]),\d|MacBookPro(1[5-9]|2[0-9]),\b[0-9]{1,2}\b)

 

 

As done previously, you can create a smart group using this in order to find devices in your environment that are not compatible to be upgraded to macOS Sonoma by using the criteria item Model Identifier and then selecting "does not match regex" operator. Copy/paste the regex into the value and save the Smart Group to view all mac's that ARE NOT compatible with Sonoma, or set the operator to "matches regex" to see devices that ARE compatible.

Screenshot 2023-06-07 at 9.00.27 AM.png

Once I have one of the newer MacBook Air and Pro models and/or Apple has added their identifiers to their documentation, I'll confirm that the regex still works or update as necessary.

3 REPLIES 3

Hugonaut
Valued Contributor II

Thanks for the share!

________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month

gabester
Contributor III

FWIW setting the model to not match the regex in this thread identified three more types of devices than setting the model to match the regex from this thread: 

https://community.jamf.com/t5/jamf-pro/smart-group-for-macos-14-sonoma-incompatible-devices/td-p/292...

 

^(iMac[1-9],\d|iMac1[0-8],\d|Macmini[1-7],\d|MacPro[1-6],\d|MacBook([1-9]|10),\d|MacBookAir[1-7],\d|MacBookPro[1-9],\d|MacBookPro1[0-4],\d)$

 

MacBookPro14,2, MacBookAir6,2 and MacBookAir7,2

 

(^Mac1[3-9],\b[0-9]{1,2}\b|MacBook\d{2}|MacBookAir([8-9]|\d{2}),[1-9]|Macmini[8-9],\b[0-9]{1,2}\b|MacPro[7-9],\b[0-9]{1,2}\b|iMacPro[1-9],\b[0-9]{1,2}\b|iMac(19|2[0-9]),\d|MacBookPro(1[5-9]|2[0-9]),\b[0-9]{1,2}\b)

 

Your mileage may vary, but be advised, if you've got 99 problems and you think you can solve them with regex, well, now you've got 100 problems.

grahamrpugh
Release Candidate Programs Tester

It's a good idea to add compatibility for Virtual Machines if there's likely to be any in your environment. Apple Silicon VMs have their own identifier, so you have to add that.
Here's our compatibility regex for Sonoma:

^(iMac(19|[2-9]\d)|^MacPro[7-9]|iMacPro|Macmini([8-9]|\d\d)|MacBookAir([8-9]|\d\d)|MacBook(\d\d)|MacBookPro(1[5-9])|Mac1[3-9]|VirtualMac)