Sending Scripts to Devices

About this task

Use scripts to execute commands on your devices. You can send scripts to Android Plus, Linux, macOS, Windows Desktop Classic, and Windows Mobile/CE devices.

Note: SOTI MobiControl has several predefined legacy scripts ready for use such as activate connection, show message, and wipe device. You can use one of SOTI MobiControl's predefined scripts or create a custom script. For a full list of available legacy script commands, see Using Script Commands.

To send a script to a device:

Procedure

  1. Select the device or devices you want to send scripts to and click the Send Script icon in the Device Actions menu bar.
  2. Choose a script type:
    • JavaScript: Allows you to use standard JavaScript language features to make changes to your devices. Only supported on Android Plus devices. Learn more at Android Plus JavaScript Scripts.
    • Legacy: Allows you to use SOTI MobiControl generated scripts to make changes to your devices. Supported on all devices that support scripts.
    • PowerShell Native: Allows you to use standard PowerShell language (64-bit) features to make changes to your devices. Supported on Windows devices running Windows 10.
    • PowerShell 32-bit Compatibility: Allows you to use standard PowerShell language (32-bit) features to make changes to your devices. Supported on Windows devices running Windows 10.
  3. Enter the script into the Script Editor. You can also select a saved script from the Execute Following Script dropdown list.
    Click the full screen icon: to enter full screen editing mode.
  4. Optional: Save your script for future use.
    1. Click Manage Scripts to open the Manage Scripts dialog box.
    2. Click the Add New icon: to clear the Script Editor in preparation for a new script.
    3. Click the Script Type icon: to select the correct script language.
    4. Enter your script in the Script Editor.
    5. Click Save Script.
    6. Click Close to return to the Send Script dialog box.
  5. Choose a delivery method for the script from the Delivery dropdown list:
    Delivery MethodDescription
    SOTI MobiControl Agent Sends the script to the SOTI MobiControl agent.
    Platform Notification Service Sends the script to the device using the device's native operating system messaging system.
    SMS Sends the script to the device using the SOTI MobiControl Messaging service.
    Not all delivery methods are supported on all device types.
  6. Optional: If you selected the SOTI MobiControl Agent delivery option, turn off the Queue Messages for Offline Devices toggle to prevent message queuing for offline devices.
  7. If applicable, click the warning message at the bottom of the dialog box to see which of the selected devices cannot receive scripts and why.
  8. Click Send Script.