Jamf Connect Version - Extension Attribute

SteveWalker
New Contributor III

Does anyone have an extension attribute that will return the version of Jamf Connect a Mac is running?

Our 'Patch Management' tells me we've got various out-dated versions floating around in our environment and I want to gather all of these into an Advanced Search or Policy so I can take action.

2 ACCEPTED SOLUTIONS

shannon_pasto
Contributor II

You can use "Patch Reporting" smart group criteria to do this without the need for an extra EA

View solution in original post

BGhilardi
New Contributor II

You can use this solution for an extension attribute:

#!/bin/bash
##############################################################################
# A script to collect the version of Jamf Connect Login installed. #
# If Jamf Connect Login is not installed "Not Installed" will return back #
##############################################################################

NOT_INSTALLED="Not Installed"
RESULT=""

if [ -a /Library/Security/SecurityAgentPlugins/JamfConnectLogin.bundle/Contents/Info.plist ]
then
RESULT=$( /usr/bin/defaults read /Library/Security/SecurityAgentPlugins/JamfConnectLogin.bundle/Contents/Info.plist CFBundleShortVersionString )
else
RESULT="$NOT_INSTALLED"
fi
/bin/echo "<result>$RESULT</result>"

View solution in original post

4 REPLIES 4

shannon_pasto
Contributor II

You can use "Patch Reporting" smart group criteria to do this without the need for an extra EA

SteveWalker
New Contributor III

Awesome Shannon, I had no idea that existed. That's going to make life a lot easier! Many thanks!

BGhilardi
New Contributor II

You can use this solution for an extension attribute:

#!/bin/bash
##############################################################################
# A script to collect the version of Jamf Connect Login installed. #
# If Jamf Connect Login is not installed "Not Installed" will return back #
##############################################################################

NOT_INSTALLED="Not Installed"
RESULT=""

if [ -a /Library/Security/SecurityAgentPlugins/JamfConnectLogin.bundle/Contents/Info.plist ]
then
RESULT=$( /usr/bin/defaults read /Library/Security/SecurityAgentPlugins/JamfConnectLogin.bundle/Contents/Info.plist CFBundleShortVersionString )
else
RESULT="$NOT_INSTALLED"
fi
/bin/echo "<result>$RESULT</result>"

Thank you, this is awesome! Now I can have the Jamf Connect version display when producing reports! Much appreciated.