Skip to main content
Question

Display the Site of a Deployed Jamf Computer from the Terminal

  • April 5, 2024
  • 2 replies
  • 21 views

Forum|alt.badge.img+3

Can one display what site a Jamf deployed computer is in from the Terminal application on the client?

2 replies

jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • April 5, 2024

you can use a config profile with a jamf site variable, then read that back with a defaults read.. 


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • April 6, 2024

@jamf-42's method is probably the easiest way to do this. You can also just do it with a script writing to a regular plist, like in /Library/Preferences/ for example. But using a profile is just as good and gives you the same results in the end.

Otherwise you would need to use an API call, which gets messy and potentially opens up some security concerns, depending on where and how you are running the API query.