Posted on 01-16-2018 11:27 AM
I thought you used to be able to share extension attributes but I do not remember now.
I got the basis of this from an older EA located here
[McAfee Check EPO Agent Version]https://www.jamf.com/jamf-nation/third-party-products/files/525/mcafee-check-epo-agent-version)
#!/bin/sh
#Reports the version of the McAfee EPO Agent installed on the client computer.
#Data Type in JSS for this script should be set to: string
Version=`cat /etc/cma.d/EPOAGENT3700MACX/config.xml | grep "<Version>.*</Version>" |sed -e "s/<Version>(.*)</Version>/1/"|tr "|" " "`
echo "<result>$Version</result>"
fi
Posted on 01-16-2018 11:31 AM
Looks good. FWIW, this is what I've been using:
#!/bin/bash
ePOAgent=$(xmllint -xpath "string(//Version)" /etc/cma.d/EPOAGENT3700MACX/config.xml)
echo "<result>$ePOAgent</result>"
exit 0
Going to take a look at yours though... seems easier to understand for most people.
Posted on 01-16-2018 11:34 AM
Here's ours. Always more than one way to do these things.
#!/bin/sh
EPOVersion=$(awk -F'>|<' '/<Version>/{print $3}' /etc/cma.d/EPOAGENT3700MACX/config.xml)
echo "<result>$EPOVersion</result>"
Posted on 01-24-2018 10:46 AM
@mm2270 So shorter and faster....we're stealing yours...
$ time cat /etc/cma.d/EPOAGENT3700MACX/config.xml | grep '<Version' | cut -d '>' -f 2 | cut -d '<' -f 1
5.0.6.347
real 0m0.005s
user 0m0.004s
sys 0m0.009s
$ time awk -F'>|<' '/<Version>/{print $3}' /etc/cma.d/EPOAGENT3700MACX/config.xml
5.0.6.347
real 0m0.004s
user 0m0.001s
sys 0m0.002s
$
Posted on 10-27-2022 05:05 PM
RESULT=$( /Library/McAfee/cma/bin/msaconfig -version )
Posted on 06-07-2023 11:12 PM
Hi,
With the McAfee renaming to Trellix, do you have the attribute extensions for the EPO agent, EDR or other version of the Trellix product please?