Actions89
- Alert Actions
- Backup Actions
- Custom Field Actions
- Device Actions
- Document Template Actions
- Group Actions
- Knowledge Base Article Actions
- Location Actions
- Organization Actions
- Organization Document Actions
- Query Actions
- Related Item Actions
- System Actions
- Ticketing Actions
- User Actions
- Webhook Actions
Device → Run Script
AI-generatedSummary
Run a specified script on a device in NinjaOne, optionally passing parameters and choosing the user context under which the script runs.
Inputs
- Authentication — Select the authentication method: OAuth2 (Authorization Code) or Client Credentials.
- Device ID (required) — The unique identifier of the target device on which the script will be executed.
- Script ID (required) — The identifier of the script to run on the device.
- Script Parameters — Optional JSON string or object containing parameters to pass to the script.
- Run As — Specify whether to run the script as the SYSTEM user or the Logged On User.
Output shape
a single JSON object with details of the script execution result
If script parameters are specified as a string, they are parsed as JSON before sending. The response contains the API's result of the script run request.
Examples
Example 1: Run a script with parameters on a device as SYSTEM user
Specify Device ID, Script ID, Script Parameters (JSON string), and Run As 'System'.
