Policy execution details export

TemiTheHunter
New Contributor

Hi everyone,

I recently joined an IT team using jamf and I'm in charge of automating small tasks to relieve the load of the support one of them was to check the installed application on every computer.

The script is done and running fine the only problem is that since the list of apps is in the script output the only way for me to access it is by going into the policy logs and then click on the details button.

Is there a faster way to do this with the platform or the API because we would need a monthly report on installed apps and the fleet is growing exponentially (if not I'll build something else to do it for me but a legit way would be nice)

Thank you all in advance

3 REPLIES 3

mdp
Contributor

If I'm understanding what you're asking correctly, this may fit the bill:
https://github.com/MatthewPrins/Jamf/blob/main/Policies_Completed.py

It prints a report of all completed policies for every given computer in a computer group. If there's more information you need for your report, let me know and I can make some quick edits.

---
Matthew Prins -- Jamf Scripts @ Github

I was already able to get some similar results on my end, but I would need to get the detailed output of the script ran by the policy and not just the policy completion status

You may be out of luck with the API then, because this is the format of the logs through the API: 

{'policy_id': 6, 'policy_name': 'Enforced Computer Names', 'username': 'xxxxxx', 'date_completed': '2022/07/11 at 4:39 PM', 'date_completed_epoch': 1657557575000, 'date_completed_utc': '2022-07-11T16:39:35.000+0000', 'status': 'Completed'}

No field for the details, unfortunately. Your best bet might be through writing a script for an extension attribute that pulls the information you need off the computer, and then getting a report from either a API call or a saved computer search.

---
Matthew Prins -- Jamf Scripts @ Github