Posted on 04-22-2014 12:22 PM
I am looking for a way (extension Attribute) to determine the version of Junos Pulse.app that is installed on client machines. The app has a .ini flie in the apps contents/resources folder that I'm looking to query clients to identify installed versions. Does anyone have an extension attribute that I can use to find if the specific version used of the Junos Pulse app?
Solved! Go to Solution.
Posted on 04-22-2014 12:56 PM
Here's what i used to grab the exact version of the pulse client. Unfortunately, I don't know the sed command enough to shave off the text before the '=' sign but this definitely did the job for me to make the EA and scope my update Pulse policy.
#!/bin/bash
################################
# Check Junos Pulse version
################################
JunosPulseVersion=`grep -o "DisplayVer.*" /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini`
echo "<result> $JunosPulseVersion </result>"
exit 0
Posted on 04-22-2014 12:56 PM
Here's what i used to grab the exact version of the pulse client. Unfortunately, I don't know the sed command enough to shave off the text before the '=' sign but this definitely did the job for me to make the EA and scope my update Pulse policy.
#!/bin/bash
################################
# Check Junos Pulse version
################################
JunosPulseVersion=`grep -o "DisplayVer.*" /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini`
echo "<result> $JunosPulseVersion </result>"
exit 0
Posted on 04-22-2014 01:46 PM
Thanks waqas.s.khan that worked perfectly for what I was looking to capture. Thanks for the help.
Posted on 04-22-2014 03:44 PM
@newporr I would have it return a value if you are using it for an extension attribute.
#!/bin/bash
################################
# Check Junos Pulse version
################################
if [ -d /Applications/Junos Pulse.app ]; then
RESULT=`grep -o "DisplayVer.*" /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini | cut -d'=' -f2`
echo "<result>$RESULT</result>"
else
echo "<result>Not Installed</result>"
fi
Posted on 04-22-2014 04:15 PM
Even better.
Thanks Jason
Posted on 03-13-2015 02:53 PM
Has anyone taken a stab at updating this extension attribute since the release of pulse secure? That's the new version, after Junos spun Pulse off into its own company.
The JunosPulseVersion.ini now contains information for both Junos Pulse and Pulse Secure, so the exta returns 2 versions now.
Here's how the ini file looks now:
[Junos Pulse]
DisplayVersion=5.1.1.52267
DisplayName=Junos Pulse
[Pulse Secure]
DisplayVersion=5.1.1.52267
DisplayName=Pulse Secure
Posted on 03-13-2015 03:26 PM
this works, but it embarrasses me.
RESULT=`grep -A 1 -o "Pulse Secure" /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini | grep -v "Pulse Secure" | cut -d'=' -f2 | grep '[0-9]' -m1`
echo "<result>$RESULT</result>"
else
echo "<result>Not Installed</result>"
fi
Posted on 03-13-2015 03:31 PM
Maybe this?
#!/bin/bash
################################
# Check Junos Pulse version
################################
if [ -d /Applications/Junos Pulse.app ]; then
VERSION=`grep -o "DisplayVer.*" /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini | cut -d'=' -f2`
RESULT=$(echo "${VERSION[@]}" | tr ' ' '
' | sort -u | tr '
' ' ')
echo "<result>$RESULT</result>"
else
echo "<result>Not Installed</result>"
fi
Posted on 03-13-2015 03:31 PM
slightly less embarrassing:
RESULT=`grep -A 1 -o "[Pulse Secure]" /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini | grep -v "[Pulse Secure]" | cut -d'=' -f2`
echo "<result>$RESULT</result>"
else
echo "<result>Not Installed</result>"
fi
Posted on 03-13-2015 03:33 PM
@emilykausalik that's giving me a space at the end of the version string for some reason
Posted on 03-13-2015 03:40 PM
Yeah me too. I have to poke at it a bit. I just kind of cobbled it together :D
Posted on 03-13-2015 03:45 PM
Here we go, printf works a bit better and is a bit tidier:
#!/bin/bash
################################
# Check Junos Pulse version
################################
if [ -d /Applications/Junos Pulse.app ]; then
VERSION=`grep -o "DisplayVer.*" /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini | cut -d'=' -f2`
RESULT=($(printf "%s
" "${VERSION[@]}" | sort -u));
echo "<result>$RESULT</result>"
else
echo "<result>Not Installed</result>"
fi
Posted on 03-13-2015 03:46 PM
This'll work for both the old and new versions at once:
if [ -d /Applications/Junos Pulse.app ]; then
jpRESULT=`grep -A1 "[Junos Pulse]" /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini | grep -v "[Junos Pulse]" | cut -d'=' -f2`
psRESULT=`grep -A1 "[Pulse Secure]" /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini | grep -v "[Pulse Secure]" | cut -d'=' -f2`
if [ "$psRESULT" == "" ];then
echo "<result>$jpRESULT</result>"
else
echo "<result>$psRESULT</result>"
fi
else
echo "<result>Not Installed</result>"
fi
Posted on 03-14-2015 03:22 PM
I don't have any version of Junos installed, but based on the example .ini file, something like this should also work:
#!/bin/sh
echo "<result>$(awk -F= '/[Pulse Secure]/{getline; print $NF}' /Applications/Junos Pulse.app/Contents/Resources/JunosPulseVersion.ini)</result>"
Posted on 11-16-2016 02:34 PM
@nkalister @mm2270 Hey fellow JAMF family i have a question and am reaching out for help with this. Currently i am working to identify with an extension attribute and a smart group to be able to identify what version of Pulse Secure is running for both new and old version i.e Junos pulse.
I tried to use the extension attribute scripts above and which provided me with the version information to be pulled from the devices but when i create a smart group for example:
But i am not receiving any results to be able to run an update policy i created against. Can anyone see any issue with my process or a better way or script.
Posted on 11-16-2016 02:45 PM
check the version reported by your extension attribute from one of your computer records- is it in the same format as the one in your smart group criteria? e.g. X.X.X.XXX?
is that smart group the target for the deployment? or is that smart group the machines that are up to date?
Posted on 11-16-2016 06:56 PM
@nkalister
When i look at the at what the extension attribute is i get this:
and it is the same format i am using in the smart group. Also the smart is going to show the machines that are on this version and then make them the exclusion for the policy i have ready to upgrade the application. The only issue i seem to have is the ability to single out those devices in some sort of fashion.
Posted on 03-08-2017 06:47 PM
Pinging on this issue i am running in to once more..
So when using various Extension attributes to determine the pulse version i have yet to get one that will pull the data needed to find the what is on a users system.
Some users including mine will give a result of not installed when it is. This all stems from an issue with the attribute not able to locate the application for Junos Pulse or Pulse Secure since the application changed names.
Has anyone run into this issue or shed some light on how to have an extension attribute that can verify if the system has one of the two app versions or both versions installed?