Once the Apple Configurator 2 Command Line Tools are installed, you’ll find a binary called cfgutil at /Applications/Apple Configurator 2.app/Contents/MacOS/cfgutil. The cfgutil command has a number of verbs you can see by running the command followed by the help verb, as follows:
/Applications/Apple\ Configurator\ 2.app/Contents/MacOS/cfgutil help
The following is a list of officially supported verbs:
- activate: activate iOS and iPadOS devices.
- add-tags: add a tag for iOS and iPadOS devices.
- backup: Create a backup of an iOS or iPadOS device the Configurator computer has prepared.
- clear-passcode: Clear the passcode a supervised iOS or iPad OS device.
- erase: Erase any content and settings configured on any supervised iOS and iPadOS devices.
- exec: Run scripts when iOS and iPadOS devices connect or detach from the computer running Apple Configurator.
- get: Show various properties, settings, and apps that are on a device.
- get-app-icon: Copy an app icon (based on the bundle identifier of the app) to the computer running Apple Configurator.
- get-icon-layout: Responds with the layout of the home screen on attached devices.
- get-unlock-token: Responds with the unlock token of a device provided Apple Configurator has the appropriate supervision identity.
- help: Displays how to use commands or a list of commands.
- install-app: Push an app (e.g. via an ipa file) to attached iOS and iPadOS devices.
- install-doc: Push a document to an attached iOS or iPadOS device.
- install-profile: Installs profiles saved to a file path on the Apple Configurator workstation onto attached devices.
- list: Shows a list of all devices attached to the computer.
- list-backups: Provides a list of the backups stored locally on the Apple Configurator computer where the command is being run.
- pair: Sends the device pairing command to a device, which requires someone unlock a device and click Trust on the device so further automations can run.
- prepare: Run a prepare workflow, similar to what we did previously in this chapter in the preparation section.
- remove-app: Deletes an app from a device, based on the bundle identifier.
- remove-profile: Deletes a profile from a device, based on the profile identifier.
- remove-tags: Deletes any tags that were applied to a device.
- rename: Configures the name on attached devices.
- restart: Restarts any attached and supervised devices.
- restore: Wipes the device and installs the latest available operating system (will cache the ipsw file if it’s not already cached).
- restore-backup: Restore a backup to an iOS device.
- revive: If a device is in recovery mode, attempts to remove that setting from the device so it works again as normal (if this fails the device may need to be wiped to do so).
- set-backup-password: Configures backup password settings on attached devices.
- set-icon-layout: Configures the home screen – for more on how to send data to the command look at the output of get-icon-layout.
- set-wallpaper: Configures background images on supervised iOS and iPadOS devices that are attached.
- shut-down: Turns off any supervised devices that are attached.
- syslog: Displays the syslog of the device in Terminal.
- unpair: Disables the pairing for attached devices, making it impossible to run the rest of the commands in this list.
- version: Outputs with the version of the cfgutil command (e.g. 2.9).
These are mostly features available in the graphical interface of Apple Configurator, many I’ve written about a number of times. I’ll try and put together a more comprehensive example cookbook laters.