Smart group for machines without a specific config profile

spowell01
Contributor

Is this possible? I didn't see config profiles as a built in option for smart groups. If it has to be done with an EA does anyone have any tips? I havent played with them yet....

Our situation is that we deployed our 802.1x wifi config as a profile, and are having issues with the profile getting reapplied/redistributed and machines removing the profile. Of course once the machine loses its wifi profile, it cant get an updated one. Now we aren't really updating the profile, just redistributing it in hopes of it getting to specific machines that removed it. That caused us many more headaches and im now trying to determine which machines are sitting out there dead in the water without a wifi profile. Our thoughts are now to repackage our mobileconfig file into a policy, apply that to all machines and then scope the removal of the original config profile.

Thanks for any input/advice here!

1 REPLY 1

mm2270
Legendary Contributor III

I think you'd have to do this with an EA. Lookup the man page for the 'profiles' command for starters. An example of how it could be done:

#!/bin/sh

WifiProfile=`profiles -C -p com.wifiprofilename.profile | awk '/profileIdentifier/{ print $4 }'`

if [ "$WifiProfile" != "" ]; then
    echo "<result>$WifiProfile</result>"
       else
    echo "<result>N/A</result>"
fi

That should return something like "com.wifiprofilename.profile", but I really don't know exactly how your profile in question was applied, so the above would need to be tested on a Mac that had the profile installed. The -C flag looks for computer based profiles, which I assume you did since its a Wi-Fi profile. You could change that to -P, which shows all profiles, computer or user based.