Skip to main content
Question

Which Scripting Language Will Help To Administrating Mac OS with Jamf Pro ??


sjha967
Forum|alt.badge.img+5

Last couple of times, i was get into Python & Bash programming. But, someone say R is good becuase there is lots of library available to use without coding. But on Python everything needs to code.

Also wondering the programming or language should have future which will help or compatible with Jamf activity etc.

9 replies

dsavageED
Forum|alt.badge.img+8
  • New Contributor
  • 169 replies
  • August 21, 2018

Most of the scripts we use are based on python or bash, with the odd fallback to applescript...

If your curious see - https://github.com/UoE-macOS/jss


bpavlov
Forum|alt.badge.img+18
  • Esteemed Contributor
  • 1206 replies
  • August 21, 2018

Bash or Python if you're starting off.


boberito
Forum|alt.badge.img+22
  • Jamf Heroes
  • 449 replies
  • August 21, 2018

Just like @dsavageED said, bash and python with the occasional AppleScript.

I've personally played with php to make a simple web page thing to update some elements in the jss.


Forum|alt.badge.img+10
  • Valued Contributor
  • 193 replies
  • August 21, 2018

Bash has been our primary scripting language for a while now. With the future implementation of the universal api (and possible departure from XML) the need for python's json tools may require a shift to python. I am attempting to learn more about python now just in case.


Forum|alt.badge.img+26
  • Valued Contributor
  • 907 replies
  • August 21, 2018

Bash and AppleScript are the easiest to start out with. I tend to like Bash of those two as it gets more to the point and less error prone, but AppleScript has it's place...particularly if you need an enduser GUI involved.

If you are in a spot to learn Python, I'd recommend as it can parse JSON well and is more powerful than simple bash scripting.


Forum|alt.badge.img+7
  • New Contributor
  • 65 replies
  • August 21, 2018

I would strongly recommend Bash. Python is powerful for sure, but a lot of the functional changes you commonly need to make are (arguably) best made with Bash scripts. There are a lot of binaries native to macOS that can handle a number of tasks. A couple good resources I can think of for scripts are:

  • MacAdmins Slack
  • Jamf Nation
  • https://github.com/rtrouton
  • https://github.com/jamfprofessionalservices
  • Google

Really just start looking around for the things you want to do (Wi-Fi migration, automating software updates, making GUI changes, etc.). Then start making scripts and testing them out.


Forum|alt.badge.img+16
  • Valued Contributor
  • 1002 replies
  • August 21, 2018

Bash all the way as a starting point for me, the direct similarities to how things behaviour in Terminal makes it very very easy to learn and test.
Applescript is useful for a number of UI things, but even then you usually just want to be calling snippets of it from Bash.


Forum|alt.badge.img+2
  • New Contributor
  • 10 replies
  • August 22, 2018

+1 Bash.
Python and AppleScript are great for some of the features too. We mainly use bash for any extension attributes we make too, they are just smaller and neater, plus any changes for scripts used in configurations or policies we find are better changed on the fly in bash.
A final plus for me is that its super super easy to test, if it works in a mac terminal then it works in a script. Usually at least.


Forum|alt.badge.img+10
  • Valued Contributor
  • 179 replies
  • August 22, 2018

Bash.

there is a book available that was recommended by a JAMF CSR.
Find it here at amazon: https://www.amazon.com/gp/product/1596822015/ref=oh_aui_detailpage_o05_s00?ie=UTF8&psc=1


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings