Posted on 07-18-2017 11:08 AM
Hey everyone,
Just wanted to find out if there is a way to list all the packages and scripts that are made available though Self Service via the terminal. I like using the terminal and don't have a Macbook issued by the company, I'm currently on PC and use puTTy to SSH into machines remotely. Is there any way to do this?
Thanks for your help in advance! :)
Posted on 07-18-2017 11:40 AM
You won't be able to get this info from any individual Macs by SSHing into them, since they are generally not aware of all the packages and scripts that are in the JSS (Jamf Pro server)
You could possibly build a list of these using the jamf API, but it would be a bit tricky to determine which are only available in policies or for that matter only offered in Self Service, since the packages themselves don't contain that information. Only the policies do. It's possible to get this info, but it would involve looping over all the policies in a script to determine a) which ones are Self Service offerings, and b) which packages and/or scripts are used in those policies. I don't know of a single way to get this out of the API.
It may be possible with a direct MySQL query, but that's generally discouraged.
Posted on 07-18-2017 12:16 PM
If you have too much time on your hands, you can curl the self service URL and parse through the output of that...
https://JSS.url.com:8443/selfservice2/index.html?en0=00.3f.d1.c3.e9.40&uuid=ED6DD985-014C-5FBE-A784-1AA5D4FD4414&day=tue&clientHour=15&clientMinute=12&networkRequirements=Ethernet&localUsername=jdoe&ssVersion=9.97.1488392992