Posted on 07-18-2017 03:58 AM
Hey guys.
Can Jamf create analytics for scripts the was successfully deployed?
I want to create scripts to test if installation succeed or not (Check existence of the file)
and to analyze my enterprise environment to see in which Macs it worked.
If It does , Can I provide an exit code or something?
Solved! Go to Solution.
Posted on 07-18-2017 05:51 AM
You can create a smart group whose criteria is "Name of Extension Attribute" is "Kids In School".
That Extension attribute will be updated whenever computers update inventory (every 24 hours + when you run it as part of a policy). Computers will be added/removed from that group as the /tmp/ file comes or goes.
For example, I have a policy to install a security agent on computers. I have an extension attribute to see if the agent is installed and running. And a smart group of computers where it is NOT installed and running. Then I scope that install policy to computers that have the agent NOT running and run once every 24 hours.
Posted on 07-18-2017 04:26 AM
I think what you are looking for is called an 'Extension Attribute' under Settings. You write a script to do it's thing and return a result. That result shows up as a computer attribute. From there you can make smart groups and policies to address those machines. Text back to the JSS needs to be in <result> tags.
#!/bin/sh
if [ -f /tmp/stayinschool.kids ]; then
echo "<result>Kids In School</result>"
else
echo "<result>Damn Dropouts</result>"
fi
Posted on 07-18-2017 04:53 AM
and I can make Jamf to return a list of every computer that the result was kids in school?
Posted on 07-18-2017 05:51 AM
You can create a smart group whose criteria is "Name of Extension Attribute" is "Kids In School".
That Extension attribute will be updated whenever computers update inventory (every 24 hours + when you run it as part of a policy). Computers will be added/removed from that group as the /tmp/ file comes or goes.
For example, I have a policy to install a security agent on computers. I have an extension attribute to see if the agent is installed and running. And a smart group of computers where it is NOT installed and running. Then I scope that install policy to computers that have the agent NOT running and run once every 24 hours.