Trigger Actions via the Command Line
In addition to Self Service options, Actions can be remotely executed on a workstation through an SSH connection or by using the Apple Remote Desktop UNIX command. You can find a full list of our command line triggers on our web site here.
SSH (Secure Shell Protocol)
- Navigate to your Applications > Utilities folder and open the Terminal application.
- Gather the username and password for the target workstation, as well as the IP address or DNS name.
- Type the following into Terminal and press Return (replacing username and ipaddress/DNS with the info from step 2): ssh username@ipaddress
- Enter the password associated with the username and press Return. Type yes to acknowledge the RSA fingerprint (if prompted).
- To manually run an Inventory Report, type the command: sudo jamf recon
- To trigger an Action, type the following (replacing actiontrigger with the specific Action's trigger from this page): sudo jamf policy -event actiontrigger
The Action will begin to execute behind the scenes. If an Action is chosen that includes a software installation or patch of some kind, then the end-user may see a disk image mount briefly on the Desktop. The disk image will only show up if the end user has "CDs, DVDs and iPods" checked in Finder > Preferences > General (this is unchecked by default).
Apple Remote Desktop
- Open Remote Desktop.
- Select the workstation(s) where you want to trigger an Action.
- Click on the UNIX button (or Menu > Manage > Send Unix Command…). A window will appear (see screenshot below).
- Type this command into the top white box (replace actiontrigger with the Command Line Trigger you would like to run): /usr/local/jamf/bin/jamf policy -event actiontrigger
- Click on the User radial button (under Run command as) and enter: root
- Click Send.
The Action will begin to execute behind the scenes. The end-user may see a disk image mount briefly depending on their preferences.