Scripting Help

Morningside
Contributor II

For those of us new to scripting, and trying to get passably good at it, I am wondering if there are any resources available through jamf to assist in this. For example, is there a generic script library I can pull from? If I wanted to issue terminal commands based on who is logging in, what is the easiest way to do this in a script?

6 REPLIES 6

SVM-IT
New Contributor III

On JAMF Nation, under "More" on the Main Menu there is a category "Scripts".

Seth

rderewianko
Valued Contributor II

hello and welcome!

I'd start by searching on github, tons of other macadmins have published repos with their scripts.

most of us arent scripting based on "who's logging in", if we are we're using something like jamfconnect to facilitate login scripts

Hugonaut
Valued Contributor II

Ask your jamf buddy about the Jamf Training. If you have a Cloud Based or Subscription Based Jamf Pro Contract you can get access to the Jamf Training Portal that has modules available for Scripts. If you have a perpetual based susbscription you cannot access this but may be able to get a free trial.

________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month

Morningside
Contributor II

Awesome that there are 119 scripts that have been uploaded to More > Scripts. How do I upload the one the I wrote so others can use it?

mm2270
Legendary Contributor III

@Morningside You can upload scripts through a product page. For example, if you had a script that was related to say, Adobe Flash Player, you would go to the 3rd Party Products Flash Player page, then click on Scripts and you will see a button to upload scripts there.
For more generic scripts not related to some specific software title you can always use "Mac OS X" or a more specific version, like "MacOS Sierra" In fact, if you look at the previous "Mac OS X" page, you'll see 48 scripts attached to that.

I'm not 100% certain, but I believe someone at Jamf reviews the script before it becomes available for others, just to be sure nothing malicious makes it up there.

easyedc
Valued Contributor II

My suggestion is to also open up posts here in JAMF Nation. Often times members, myself included, will post questions for help on a certain topic, and then come back and post answers to those questions. When a script is the key, many/most members will post the script that works as the fix for them. For me, an example is HERE where I asked a question, made sure to put a decent subject and then throw my script in, plus marking the answer. While you're not directly uploading a script to the Scripts category, it is searchable by google. So if you just google search for "jamf script [subject]" I get a lot more hits than if I just browsed the Scripts category.