Smart group configuration profile

Captainamerica
Contributor II

Is it possible to made smart groups when a specific configuration profile is installed

So if I look for a config profile called "Extension" I would like to have a smart group on those computers who have this or not. I can of course create some EA, but doubt how to create this as script

6 REPLIES 6

m_donovan
Contributor III

Here is what we are using as an extension attribute to check for our wireless profile.

###########################################################################################################
# EA: WI-FI_PROFILE_NAME Installed?
###########################################################################################################

#!/bin/sh

profileName="WI-FI_PROFILE_NAME"

profiles=`profiles -C -v | grep attribute | awk '/name/{$1=$2=$3=""; print $0}' | grep "$profileName"`
if [[ ! -z "$profiles" ]]; then
  echo "<result>Yes</result>"
else
  echo "<result>No</result>"
fi

exit 0

You can then base the smart group on that.

rhooper
Contributor III

Thats pretty sweet.
I wonder why JAMF has not created a smart group criteria based on a profile being true or not.

mschroder
Valued Contributor

What is wrong with using 'Profile Identifier' as criterium for a smart group? It does not even require an EA or an inventory update, the MDM just knows about it.

Good call.  On a user level profile you can open download/open the config file in an editor and get the Profile Identifier

jlombardo
Contributor

Is it possible to query this when it is a user level policy?

tjhall
Contributor III

sudo profiles -Pv should give you the names and UUID's of the configs installed.