

The Shell-Script Command File is basically a text file containing multiple lines of UNIX shell code that use the “automator” command to execute a specific workflow file. The -a option is used to identify the shell command file to execute when a device is attached, and the -d option (not shown here) is used to run a specified shell command file when the device is detached from the computer. The structure of the “exec” command, entered in a new Terminal window, follows a simple structure: /usr/local/bin/cfgutil exec -a path/to/shell/mand The Apple Configurator 2 built-in command-line utility “cfgutil” provides the “exec” command which will run an instance of a specified shell-script command whenever iOS devices are either attached or detached from the host computer. When the Terminal session is stopped (the Terminal session window is closed), the attachment triggers cease, and connected devices will no longer be automatically processed. NOTE: This auto-proccessing scenario only works while the Terminal session for the “exec” command is active.So if 24 devices are connected, 24 instances of the workflow will be created run simultaneously. NOTE: The Terminal session 2 makes sure that each connected iOS device is “attached” to its own instance of the OS automation runner that executes the targeted Automator workflow.

(⬆ see above ) The targeted workflow 7 begins and ends with specialized Automator actions that are designed to keep track of iOS devices as they are processed and to return logging data 8 back to the Terminal window 2 displaying the feedback of the initial attachment command.(⬆ see above ) With the session active, connecting an iOS device to the managing computer, triggers the execution 3 of the shell command file 4 that contains as its code, a shell script 5 that tells the OS to load and run 6 a specified Automator workflow file 7 designed to be used with attached iOS devices.

The “exec” command 1 references the path to a shell-script command file 4 that in turn, uses the “automator” command 5 to run a specified workflow 7 that contains the actions for processing the devices. The execution of the “exec” command begins a new active session process 2 whose log is displayed in the Terminal window.
#Apple configurator 2 windows install#
To use these tools with macOS High Sierra, install the provided attachment tools and actions after removing earlier versions of the Automator actions and command files that are incompatible with macOS High Sierra. IMPORTANT: The attachment mechanism and tools provided here will work with both macOS Sierra, and macOS High Sierra. Such a scenario is possible using Apple Configurator 2, but requires some initial setup involving the Terminal application, the built-in “cfgutil” command-line utility, and a special set of Automator actions. And here is a detailed presentation from the Jamf JNUC 2018 regarding the tools provided on this website:Ī popular device management scenario is one in which the act of connecting an iOS device to a computer running device management software, will automatically trigger the restoration and formatting of the connected devices without requiring any user-interaction.
