With that data you can pre-fill your text files or databases.
#HOW TO RUN SCRIPTS AUTOMATOR MAC TRIGGER SERIAL NUMBERS#
You could read or scan the serial numbers from the labels of the Mac’s boxes or even get the list with the purchase order from most vendors. If you have a management system or asset database, there is probably an XML or JSON API, you can use to retrieve this information from a script. As an admin you could provide a text file mapping serial numbers to a name and/or asset tag on a server, that a script can download ( curl) and parse. This is a task that can be fully automated in many situations. Do you really need UI?Ī common example for user interaction is to get and set the Computer Name or Asset Tag/ID/Number from manual input. MacOS Mojave will introduce even more pitfalls with its increased security features. If, however, you really are convinced that user interaction is necessary, then you need be aware there are many potential pitfalls in writing shell scripts with user interaction. Maybe you can come up with a different workflow that can provide the data from a source that can be automated without user interaction. In most cases, when you believe you need to prompt the user for, well, anything, you should take that moment to re-think your workflow. User input also requires validating and checking user entered data. User interaction slows down the process as the script is waiting for the user to confirm or enter data. In nearly all cases, we want the automation to happen “magically” in the background, without any user interaction. You immediately reduce the workload, but also reduce the potential for someone to make a mistake, which would mean even more work later. As MacAdmins our goal is to automate workflows when ever possible.