Skip to main content
Question

Listing available packages and scripts via terminal/SSH

  • July 18, 2017
  • 2 replies
  • 17 views

Forum|alt.badge.img+1

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! :)

2 replies

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • July 18, 2017

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.


Forum|alt.badge.img+15
  • Contributor
  • July 18, 2017

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