Scripting: Your need to know basics

Scripting: Your need to know basics

If you’re looking to take a more hands-off approach to your device management processes, scripting is a great way to automate day-to-day tasks such as update rollouts, security policy deployments, remote wipes, troubleshooting and everything in between.

For those that don’t know, a computer script is a list of commands that are executed by a certain programme or engine. Scripts are used to automate the execution of tasks that would normally be carried out one by one by a human operator, thus removing the tedium of repetitive processes.

There are lots of different scripting languages, but as we’re talking about device management, lets take a look at the languages a popular Mac management tool like Jamf Pro supports:

– Perl (.pl)

– Bash (.sh)

– Shell (.sh)

– Non-compiled AppleScript (.applescript)

– C Shell (.csh)

– Zsh (.zsh)

– Korn Shell (.ksh)

– Tool Command Language (.tcl)

– Hypertext Preprocessor (.php)

– Ruby (.rb)

– Python (.py)

LaunchDaemons are system processes that start up every time your device is booted. Essentially, they form part of the nuts and bolts of scripted operations, and whether you use the features they provide doesn’t matter – they’re always chugging away in the background consuming RAM. LaunchDaemons run as part of a unified framework known as launchd, which starts, stops and manages daemons, applications, processes and scripts.

Similarly, LaunchAgents are file locations that house scripts and automatically manage system processes. Unlike LaunchDaemons, they load when an individual users logs in, rather than when the device is booted. Simply put, LaunchDaemons and LaunchAgents are essential for triggering scripts and applications, as well as automating device management procedures. They can also be programmed to operate as and when you see fit – whether that’s every so often, at set intervals and so on.

With MDM (mobile device management) solutions, users can run, manage, deploy and add scripts to package sources. Package sources allow you to view and edit the attributes of a package, including files, scripts, privileges and localisations. This makes it easier to deploy devices at scale and automate processes associated with device management.

If you’re looking to effectively manage and deploy package sources, it’s essential to consider a third party solution such as Jamf Pro. Not only that, but a trusted partner (like Jigsaw24) can help you skip the steep learning curve. We can write and deploy scripts for you, and handle all the tough technical stuff to ensure your management solution and other processes are running at maximum efficiency.

If you’d like to find out more, you can download our Mac Management white paper here. Alternatively, if you need a hand with script writing give us a call on 03332 409 365 or email solutions@Jigsaw24.com. For all the latest news and reviews, follow us on Twitter @WeAreJigsaw24 and ‘like’ us on Facebook.