Mac OS X Command (Execute)

Use the Task Execute Mac OS X Command to run commands on Agents running on Mac OS X.


  • Scripts that you run on an Agent for Mac OS X using the Tasks Execute Mac OS X Command cannot include reboot and shutdown commands. Use a Reboot or Shutdown Task instead. See Mac OS X Computer (Reboot, Shutdown).

Settings tab

  • Use the option Insert resource link from the context menu in the Command line box to specify a Resource. When inserting a Resource link, the GUID of the selected Resource will be used in the command line. The Resource will be added to the command line box as $Workspace{<resource GUID>}. When the Task is executed, the Resource will be downloaded to the Agent`s cache automatically and will be called from that location.
  • The option Set parameter with exit code allows you to place an exit code into a parameter, for use in another Task in the Module. For example, suppose you have configured a Module with this Task and another Task that installs certain software. By using the option Set parameter with exit code in the first Task, you can use this parameter in a condition in the Task that installs software, to determine whether it should be executed.
  • The option Set parameter with standard output allows you to place the standard output into a parameter, for use in another Task in the Module (e.g. a Query).
  • In the field Timeout command execution after, you can specify a maximum number of 9999 minutes (about 166 hours and 40 minutes). You can use parameters, functions and variables.
    • When 0 timeout is detected (when 0 was entered or when parameter, functions, variables translate to non-numeric values) the fallback will be the maximum timeout period (9999 minutes).
    • In certain situations, Agents can continue to execute the remaining commands in the script when the timeout expired. You can prevent situations like these by selecting the option Terminate process when timeout expires.

Script tab

  • Scripts can be typed in directly.
  • Use the File extension of script field to specify the file extension that Ivanti Automation should use. This extension is used to save the script as a script file in the specified format when the Task is executed. Ivanti Automation will save this file in the temporary folder on the Agent that executes the Task.
  • Use the Open in editor button to open an external editor that is associated with the specified file extension in the File extension of script field. This makes it easier to create complex scripts and troubleshoot existing ones. After creating or editing the script, it will be copied from the external editor to the Script tab. If no associated editor can be found, the script will be opened in Notepad. For more information on how to configure file associations, see
    • The Scripts tab has a limit of 64KB. If you use an external editor to edit a script, Ivanti Automation will disregard any characters that exceed this limit.
  • Log and error files are included in the detailed Job history.

When aborting a Job that contains Task Execute Mac OS X Command, any running scripts and processes will also be terminated.