Scripts are commands used by SureMDM to perform a specific task or activity. SureMDM offers an easy-to-use scripting engine that allows an IT administrator to control and remotely change or update application or system settings on a single or multiple registered devices.
How Does It Help?
1. The scripting engine offered by SureMDM can be a quick solution for pushing out specific functions on single or multiple devices. Instead of updating a function manually on all deployed devices, run scripts can be used to perform the action in one shot on multiple devices, saving time.
2. SureMDM allows IT admins to control any system setting by simply creating a script and pushing it out as a job. Example, if a company wishes to launch a particular application on a device, it can do so by running script similar to below:
am start -a android.intent.action.MAIN -n com.example.app/.MainActivity
3. Lots of times, action admin wants to run on the device might be conditional and contextual. It’s not possible to come up with UI for all such scenarios. A powerful scripting engine offers flexibility and efficiency in such scenarios. Example, if a particular log file is present on SD card, launch an application on the device to upload the logs to cloud. This can be easily achieved through following script:
ls /path/to/your/files* 1> /dev/null 2>&1; then am start -a android.intent.action.MAIN -n com.logger/.UploadToCloud
Use Case Scenarios
SureMDM’s scripting engine come in handy when IT admins wish to control devices being handled by end users. It offers a convenient way to reboot a device, shut it down, launch applications, disable apps, configure emails, launch a particular application or settings, open browsers with URL, dial phone numbers and much more. They are an easy option to silently install/uninstall applications on devices registered with SureMDM as well. Run scripts engine also support complete Linux scripting engine, allowing execution of all the Linux based commands (like rm, mv, cat, mkdir, etc.) on standard android devices through the SureMDM Web Console.
List of commonly used scripts can be found are here
How to Create a Run Script Job on SureMDM?
1. Login to SureMDM
2. Click Jobs
3. Click New Job
4. Select the platform you wish to create the job for. (Android or Windows)
5. Click Run Script
6. Give a name to the job and add the Command
7. Click on Save to complete and save the Run Script job
How to Apply a Run Script Job in SureMDM?
1. Go to SureMDM Home
2. Select the device(s) from Device List
3. Click Apply
4. Select the job that you want to apply on the device.
5. Click Apply to complete.