How to use the Run Local Scripts Action

Looking For

Something Else?

SEARCH

Android - Agent

This category covers Moki's Agent/Device Administrator management solution.

IOS

This category covers Moki's iOS management solution.

Android Enterprise

This category covers Moki's Android Enterprise management solution.

BrightSign

This category covers Moki's BrightSign management solution.

FAQs

This category provides general FAQs about Moki's solutions.

News & Updates

This category provides news and updates.

What is Run Local Scripts used for?

You can use the Run Local Scripts Action to execute any bash script that is located in the MokiMDM folder on the device. This includes being able to run a script to pull device logs.

Using Run Local Scripts for Any Script File:

  1. Perform a Send File Action to the device, sending the desired bash script file to the device. You must send the file to the MokiMDM file on the device. You can use file path /sdcard/MokiMDM/
    Send_File_Action
  2. Using the Action dropdown, select Run Local Scripts. You have two options:
    1. You can enter a specific file name located in the MokiMDM folder to run only that specific script file. **Contact Moki Support if you wish to use this feature. This option requires running Agent version 3.9.20 or higher.**
      1. Use the Pull File List Action to identify the script files already located in the MokiMDM folder on the device
    2. If no script file is specified, any bash script files located in the MokiMDM folder will be executed
      Run_Local_Scripts_Action

Using Run Local Scripts to Pull Device Logs Remotely:

  1. Perform a Send File Action to the device, sending this script file to the device. Use the file path /sdcard/MokiMDM/
    Send_File_ActionSend_File_Path_MokiMDM
  2. Using the Action dropdown, select Run Local Scripts
    Run_Local_Scripts_Action
  3. Perform the Pull File action. Use file path: /sdcard/logcat.txt (if this file path does not work, you can try, /storage/emulated/0/logcat.txt)
    Pull_File_Action
  4. The device log file will be pulled from the device and can be downloaded from the Action History section under the Completed Pull File action
    Pull_File_Download

Submit a Ticket

Contact us by email, or just fill out the form