Skip to main content

Run Script

The Run Script job for Linux enables remote execution of custom scripts on enrolled devices, automating tasks and configurations. Users can input scripts directly or choose from pre-defined options. Advanced settings allow specifying file details and permissions. This tool streamlines device management by facilitating automated actions on Linux devices through SureMDM.

To create a job to remotely run the customized script and deploy it to the enrolled device(s) or group(s), follow these steps:

  1. Navigate to the SureMDM Web Console > Jobs > New Job > Linux > Run Script.    

  2. In the Run Script prompt, enter a Job Name and Script and add scripts using any of the following approaches:

    a. Predefined Script – To add a predefined script in the Script box, follow these steps:

    • i. Click Setting displayed on the left panel. A run script will appear on the screen.
    • ii. Configure the script if required and click Validate.
    • iii. A confirmation of successful validation will be displayed.
    • iv. Click Insert.

    b. Upload a script file – To add a script from a file, follow these steps:

    • i. Click Browse to select a .txt file that has the script from the specified location.
    • ii. The run script will be inserted in the Script box.

    c. alt text AskDeepThought – SureMDM supports AskDeepThought, enabling automatic script generation from natural language prompts. Follow the below steps to generate and add scripts:

    • i. Click on the AskDeepThought button.
    • ii. Enter your prompt in the prompt field and execute.
    • iii. Verify the generated script and click Insert.

    alt text

    note

    Always review generated scripts for correctness and alignment with your environment’s policies and requirements before execution.

  3. Click Advanced Settings and enter the following details:

    SettingsDescription
    File NameName of the File
    Default PathServer Path for the file to save
    PermissionPermission Code for the file to access
  1. Click Save.

     The newly created job will be listed in the Jobs List section.

  1. Go back to the Home tab and select the Linux device(s) or group(s).

  2. Click Apply to launch the Apply Job/Profile To Device prompt.

  3. In the Apply Job/Profile To Device prompt, select the job and click OK.