NinjaOne RMM icon

NinjaOne RMM

Interact with NinjaOne RMM API

Device → Run Script

AI-generated

Summary

Run a predefined script on a specified device in NinjaOne RMM, optionally passing parameters and specifying the credential or role to execute the script as.

Inputs

  • Device (required) — Select the target device on which to run the script. Supports selecting from a list of devices or providing the device ID directly. Expressions are supported.
  • Script (required) — Select the script to run from a list of available scripts or provide the script ID directly. Supports expressions.
  • Script Parameters — Optionally provide parameters to pass to the script as a string, e.g., 'param1=value1'. Supports expressions for dynamic values.
  • Run As (Credential) — Specify the credential or role under which to run the script. This can be 'system' (default if empty), a credential name like 'sysop', or a credential ID number.

Output shape

a single record with the API response indicating the script invocation result

The output contains the NinjaOne API response to the script run request. If the request is successful, it typically includes details such as the script job ID or status. Errors are reported if the script ID is invalid or execution fails.

Examples

Example 1: Run a Script Without Parameters

Select a device, choose a script, leave parameters and runAs empty (defaults to system), and execute.

Example 2: Run a Script With Parameters and Custom Credential

Choose device and script, provide script parameters as a string (e.g., 'param1=value1'), and specify a runAs credential name or ID.

Links

Discussion