Home > Casper, Mac administration, macOS > Building a Casper smart group containing Sierra-incompatible Macs

Building a Casper smart group containing Sierra-incompatible Macs

As part of preparing for macOS Sierra, I’m planning to provide a way for my customers to upgrade themselves to Sierra via Casper’s Self Service. Unlike the upgrade process I was able to provide for OS X Yosemite and El Capitan, where I could filter based on whether or not a particular Mac could run OS X 10.8.x, Sierra’s system requirements exclude some Macs which can support running OS X El Capitan.

To help make sure that Self Service wasn’t providing the option of upgrading to macOS Sierra to a Mac which couldn’t run it, I needed to compile lists of which Mac models could and couldn’t run macOS Sierra, based on the system requirements that Apple provided. For more details, see below the jump:

As of Tuesday, September 20 2016, here is the list of Mac models not compatible with macOS Sierra:

'MacBookPro4,1'
'MacPro2,1'
'MacBookPro5,1'
'MacBookPro1,1'
'MacBookPro5,3'
'MacBookPro5,2'
'iMac8,1'
'MacBookPro5,4'
'iMac5,1'
'iMac5,2'
'iMac6,1'
'MacBookPro3,1'
'MacBookPro1,2'
'iMac9,1'
'Macmini3,1'
'Macmini1,1'
'iMac4,2'
'MacBookPro2,2'
'MacBookPro2,1'
'MacBook3,1'
'MacBook5,1'
'MacBook5,2'
'MacBook2,1'
'iMac4,1'
'MacBook1,1'
'MacBookPro5,5'
'Xserve2,1'
'MacBookAir1,1'
'Xserve3,1'
'MacBookAir2,1'
'Xserve1,1'
'Macmini2,1'
'MacPro3,1'
'iMac7,1'
'MacBook4,1'
'MacPro1,1'
'MacPro4,1'

view raw
gistfile1.txt
hosted with ❤ by GitHub

As of Tuesday, September 20 2016, here is the list of Mac models compatible with macOS Sierra (with both model ID and board ID):

MacBook9,1: 'Mac-9AE82516C7C6B903'
iMac14,1: 'Mac-031B6874CF7F642A'
iMac10,1: 'Mac-F2268DC8'
MacBookPro8,1: 'Mac-50619A408DB004DA'
MacBook6,1: 'Mac-F22C8AC8'
MacBookPro10,2: 'Mac-AFD8A9D944EA4843'
iMac12,2: 'Mac-942B59F58194171B'
iMac14,2: 'Mac-27ADBB7B4CEE8E61'
MacBook8,2: 'Mac-F305150B0C7DEEEF'
MacBookAir6,1: 'Mac-35C1E88140C3E6CF'
iMac14,3: 'Mac-77EB7D7DAF985301'
MacBookAir5,2: 'Mac-2E6FAB96566FE58C'
Macmini5,3: 'Mac-7BA5B2794B2CDB12'
MacBook8,1: 'Mac-BE0E8AC46FE800CC'
iMac13,1: 'Mac-00BE6ED71E35EB86'
MacBookPro9,1: 'Mac-4B7AC7E43945597E'
MacBook7,1: 'Mac-F22C89C8'
MacBookAir7,2: 'Mac-937CB26E2E02BB01'
MacBookPro8,3: 'Mac-942459F5819B171B'
iMac16,2: 'Mac-FFE5EF870D7BA81A'
MacBookPro7,1: 'Mac-F222BEC8'
Macmini5,2: 'Mac-4BC72D62AD45599E'
MacMini4,1: 'Mac-F2208EC8'
MacBookAir5,1: 'Mac-66F35F19FE2A0D05'
MacBookPro11,1: 'Mac-189A3D4F975D5FFC'
MacBookAir4,1: 'Mac-C08A6BB70A942AC2'
Macmini5,1: 'Mac-8ED6AF5B48C039E1'
iMac15,2: 'Mac-FA842E06C61E91C5'
iMac13,2: 'Mac-FC02E91DDD3FA6A4'
MacBookPro11,4: 'Mac-06F11FD93F0323C5'
MacBookPro11,5: 'Mac-06F11F11946D27C5'
MacBookPro9,2: 'Mac-6F01561E16C75D06'
MacPro6,1: 'Mac-F60DEB81FF30ACF6'
iMac14,4: 'Mac-81E3E92DD6088272'
MacBookPro11,2: 'Mac-3CBD00234E554E41'
MacBookPro6,2: 'Mac-F22586C8'
MacPro5,1: 'Mac-F221BEC8'
MacBookAir3,2: 'Mac-942C5DF58193131B'
iMac11,3: 'Mac-F2238BAE'
MacBookAir7,1: 'Mac-9F18E312C5C2BF0B'
MacBookPro10,1: 'Mac-C3EC7CD22292981F'
iMac10,1: 'Mac-F221DCC8'
MacBookAir4,2: 'Mac-742912EFDBEE19B3'
iMac17,1: 'Mac-B809C3757DA9BB8D'
Macmini6,2: 'Mac-F65AE981FFA204ED'
Macmini6,1: 'Mac-031AEE4D24BFF0B1'
iMac17,1: 'Mac-DB15BD556843C820'
MacBookPro6,1: 'Mac-F22589C8'
iMac11,2: 'Mac-F2238AC8'
MacBookAir3,1: 'Mac-942452F5819B1C1B'
iMac17,1: 'Mac-65CE76090165799A'
Macmini7,1: 'Mac-35C5E08120C7EEAF'
MacBookPro8,1: 'Mac-94245B3640C91C81'
iMac15,1: 'Mac-42FD25EABCABB274'
iMac13,3: 'Mac-7DF2A3B5E5D671ED'
iMac11,1: 'Mac-F2268DAE'
MacBookPro11,3: 'Mac-2BD1B31983FE1663'
MacBookAir6,2: 'Mac-7DF21CB3ED6977E5'
iMac16,1: 'Mac-A369DDC4E67F1C45'
iMac10,1: 'Mac-F2268CC8'
MacBookPro8,2: 'Mac-94245A3940C91C80'
MacBookPro12,1: 'Mac-E43C1C25D4880AD6'
iMac12,1: 'Mac-942B5BF58194151B'

view raw
gistfile1.txt
hosted with ❤ by GitHub

Once both lists were compiled, I had to decide whether or not to filter based on if a Mac was compatible or incompatible with Sierra. Since the list of incompatible Macs was not likely to change, I decided to go the route of excluding incompatible Macs. As part of that, I needed to build a Casper smart group containing the model IDs of those incompatible Macs.

Since that was otherwise going to involve a lot of clicking in the web interface, I opted to build a smart group XML file and then import the complete smart group via the Casper API. The smart group XML file is available below:

<?xml version="1.0" encoding="UTF-8"?>
<computer_group>
<name>Macs incompatible with macOS Sierra</name>
<is_smart>true</is_smart>
<criteria>
<size>37</size>
<criterion>
<name>Model Identifier</name>
<priority>0</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro4,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>1</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacPro2,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>2</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro5,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>3</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro1,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>4</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro5,3</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>5</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro5,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>6</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac8,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>7</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro5,4</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>8</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac5,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>9</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac5,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>10</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac6,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>11</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro3,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>12</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro1,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>13</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac9,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>14</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Macmini3,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>15</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Macmini1,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>16</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac4,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>17</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro2,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>18</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro2,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>19</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBook3,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>20</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBook5,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>21</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBook5,2</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>22</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBook2,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>23</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac4,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>24</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBook1,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>25</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookPro5,5</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>26</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Xserve2,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>27</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookAir1,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>28</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Xserve3,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>29</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBookAir2,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>30</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Xserve1,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>31</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>Macmini2,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>32</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacPro3,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>33</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>iMac7,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>34</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacBook4,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>35</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacPro1,1</value>
</criterion>
<criterion>
<name>Model Identifier</name>
<priority>36</priority>
<and_or>or</and_or>
<search_type>is</search_type>
<value>MacPro4,1</value>
</criterion>
</criteria>
<computers/>
</computer_group>

To upload it to a JSS server using the API, download the XML file to a convenient location, then run the command shown below (substituting as appropriate):

curl -skfu username:password https://casper.server.here:8443/JSSResource/computergroups/id/0 -T /path/to/filename.xml -X POST;

If the smart group was successfully uploaded, you should next see output similar to that shown below:

<?xml version="1.0" encoding="UTF-8"?><computer_group><id>64</id></computer_group>computername:~ username$

view raw
gistfile1.txt
hosted with ❤ by GitHub

A new smart group named Macs incompatible with macOS Sierra should also now be present on the JSS.

Screen Shot 2016 09 11 at 8 12 26 PM

  1. John
    September 20, 2016 at 9:02 pm

    that’s really slick! thank you!

  2. Dan
    September 29, 2016 at 2:45 pm

    Thanks Rich! Worked like a charm.

  3. September 11, 2017 at 8:02 pm

    Purrrrrrfect, thanks 🙂

  4. Alex McClements
    October 12, 2017 at 6:20 am

    Hi Rich, is this designed to work with JAMF Cloud?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: