Skip to main content

Run Script (Windows)

The Run Script job empowers administrators to execute customized scripts on enrolled devices, offering a dynamic approach to device management. By using the Run Script job, administrators gain the flexibility to address a wide range of scenarios, from software updates and system diagnostics to configuration adjustments. 

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

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

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

    a. Custom Script – Type a custom script in the Scipt box.

    b. 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.

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

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

    d. 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.

      • Select Execute In Currently Logged In User Account to run the script in currently logged in user context on the device.
      • Click Save.

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

  3. Go back to the Home tab and select the Windows device(s) or group(s).

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

  5. Select the job under All Jobs/Profiles.

  6. Click Apply in the Apply/Profile To Device prompt.