Skip to main content

Is there a way to store script output back to Jamf? Is it possible to do it in a way that is searchable?

I would like to be able to create a Computer Search for "firewall disabled".

To get the data, I could call socketfilterfw --getglobalstate in a script and report the output back to Jamf.

Is this possible?

Thank you!

Hi @NullPointer - yup, you're looking for a Computer Extension Attribute Populated by a Script.

What you describe would look something like

#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate)</result>"

But you'd likely want to parse that output a bit:

#!/bin/sh
echo "<result>$(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate| awk '{print $3}' | sed 's/.$//')</result>"

Thank you @kenglish ! I didn't realize Computer Extension Attributes existed, this opens so many doors!