Skip to main content
Question

McAfee EPO Version Extension Attribute

  • January 16, 2018
  • 5 replies
  • 24 views

Forum|alt.badge.img+10

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

5 replies

Forum|alt.badge.img+15

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.


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • January 16, 2018

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>"

donmontalvo
Forum|alt.badge.img+36
  • Hall of Fame
  • January 24, 2018

@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
$

Forum|alt.badge.img+8
  • Valued Contributor
  • October 28, 2022
RESULT=$( /Library/McAfee/cma/bin/msaconfig -version )

Forum|alt.badge.img+6
  • Contributor
  • June 8, 2023

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?