Posted on 05-10-2024 12:20 AM
Hi there, is there a way to get an extension attribute in Jamf to report a target file's last modified date?
Solved! Go to Solution.
Posted on 05-13-2024 12:28 AM
You need to wrap the output for all extension attributes with <result> & </result>
So your last command should be: echo "<result>$datemodified</result>"
Posted on 05-10-2024 03:52 AM
Use stat -x
eg: stat -x /Applications/Box.app | grep "Modify" | awk '{print $2,$3,$4,$5,$6}'
Posted on 05-10-2024 06:00 PM
Appears to be working when ran from terminal or from script/policy in Jamf but as an extension attribute it doesn't collect any data.
Posted on 05-13-2024 12:28 AM
You need to wrap the output for all extension attributes with <result> & </result>
So your last command should be: echo "<result>$datemodified</result>"
Posted on 05-13-2024 12:59 AM
Thank, that seemed to be the icing on the cake