View the Status of Sent macOS Scripts
You can view the results (including any output) of legacy scripts sent to a macOS device.
About this task
You can capture the results when one or more scripts are sent to a device, or when scheduling scripts in a device profile. The legacy script results can contain status, output and timestamp information. These script results can be used for testing scripts in development or investigating issues in production.
writeprivateprofstring ScriptExecutionInfo ScriptOutputMaxSize [ScriptOutputMaxSize]
writeprivateprofstring ScriptExecutionInfo ScriptOutputRetentionPeriod [ScriptOutputRetentionPeriod]’
Enabling Capture Script Status and Output For Sent Scripts
Procedure
Enabling Capture Script Status and Output For Scheduled Scripts
Procedure
- Create a profile (seeCreating a Profile) and choose the Task Scheduler configuration.
- In the Task Scheduler window, select Capture script status and output.
Viewing Script Status and Output Data
Before you begin
About this task
The following video demonstrates how to view script results.
Procedure
- Open the Devices view from the SOTI MobiControl console.
- Select a device to open its Device Information panel. The Device Information panel appears.
- Navigate to the Scripts tab. This tab lists all scripts sent to the device and indicates if they executed successfully or failed.
- Select the Details button of the script. The Script Details panel appears. The Script Viewer field displays the script.
-
In the Script Details window, select
Request Output to download the script data from
the device.
If the device is online, the script results download. Otherwise, the data downloads the next time the device is available online. The data appears in the Script Details window.
-
To refresh the data, select the
refresh button. An Output tab appears. Select this tab to view the
generated output.
Tip: To direct the output of a script into a text file when using the latest agent (version 2024.1.0), administrators must execute the following script on the intended device:
sudo chmod 666 /Users/username/Desktop/name of the file.txt
Important: For the execution of multiline scripts using the latest agent (version 2024.1.0), administrators must encapsulate the script within the following block tags:<SYSTEM_SCRIPT_BLOCK> # Your multiline script goes here </SYSTEM_SCRIPT_BLOCK>