Creating and configuring remote actions
Create and configure remote actions to collect information or remediate issues on targeted devices or VDI sessions.
You can create remote actions in several ways, including installing and using remote actions directly from Nexthink Library, customizing a copy of an existing Library remote action, or creating a new remote action from scratch. Nexthink recommends using Library content as a starting point before creating custom remote actions.
Installing a remote actions from Nexthink Library
Nexthink offers a set of preconfigured remote actions that you can manually install from Nexthink Library and further edit and customize them to your needs:
Edit script, parameters and output (e.g. for signing)
Configure trigger method, including adding a schedule or making the remote action available for Spark.
Specify the target object (devices or VDI sessions)
Refer to the Nexthink Library documentation for more information on installing library remote actions.
You can update the previously installed library remote action if a newer version is available.
Updating a remote action from a library pack does not overwrite existing configuration settings.
When Nexthink updates a remote action script and introduces new parameters, default values are automatically applied to ensure the script continues to function correctly. If parameters are removed in an update, they are no longer displayed in the remote action configuration.
Creating a copy of a remote action from Nexthink Library
Unlike remote actions installed from Library, you can freely edit and customize remote actions copied from Library to better suit your needs without the need to create one from scratch. Nexthink recommends using Library content as a starting point before attempting to create any custom remote actions.
Refer to Nexthink Library documentation for more information.
Creating new custom remote actions
Creating a remote action from scratch allows you to define a variety of remote actions, from opening applications following certain campaign results to updating employee devices to remote troubleshooting.
To create a new custom remote action from scratch:
From the Remote actions module on the main menu, click the New button in the top-right corner of the navigation panel to open the remote action configuration page.
From the Remote actions > Manage remote actions page, click on the New remote action button in the top-right corner of the page to open the campaign configuration page.
If you want to write your own remote action scripts, refer to Writing scripts for remote actions on Windows and Writing scripts for remote actions on Mac for more information.
Accessing remote action Edit page
To access the custom and library remote action Edit page, you can:
Create a new remote action from scratch.
From the Remote actions Administration page, hover over a specific remote action to reveal the action menu. Then select:
Edit – for custom remote actions or those copied from the Library.
Configure – for remote actions installed from the Nexthink Library.
From the remote actions details page, select Edit remote action.
Select the Remote Actions module from the main menu.
Select Manage remote actions to create, edit or manage remote actions. Refer to the Manage Remote Actions documentation for more information.
Select an existing remote action from the list in the navigation panel to view its details.
Click on the New button at the top of the navigation panel to directly create a new remote action. Refer to the Manage Remote Actions documentation for more information about creating remote actions.

Configuring general remote action settings
Enter the name, NQL ID, description, triggering options, targeting options and purpose of the remote action.
Triggering
Select the triggering mechanisms for the remote action:
Manual: Trigger the remote action manually from the web interface.
API: Trigger the execution on selected devices via API.
Workflow: Enable the listing and execution of remote actions using the Remote action Thinklet workflow.
Schedule: Trigger the execution using an NQL query at the scheduled time.
Spark: Make the remote action available for Spark. You should also grant Spark permission to run the designated remote action. Refer to Enabling Spark permissions for more details.
When you execute a remote action on an on-demand basis (manually, through a workflow or API), the system prioritizes it over scheduled remote actions. This ensures concurrent scheduled remote actions do not delay on-demand remote action executions.
Targeting
Select which environments the remote action should target:
Devices: Enable the remote action to target specific devices.
VDI session: Enable the remote action to target VDI sessions.
When targeting a session, choose whether to target:
VDI: The remote action targets the VDI device for that session.
Client: The remote action targets the client device from which the user connects to the VDI session. Note that this only works if Collector is installed on the client device.
Optionally, allow the user to override the above selection.
Purpose
Select the purpose for the remote action:
Data collection: The intent of the remote action is to collect data from the targeted device.
Remediation: The intent of the remote action is to perform an action on the targeted device.
Importing and configuring scripts
Import a remote action script for Windows and macOS platforms. Once imported, fill in the Parameters field, and the Outputs information appears.
Use the Advanced Configuration option to select the context for executing the script, and the options available include local system, interactive user or service.
To save the remote action, you must add a Windows PowerShell or macOS Bash script.
Library-pack updates overwrite existing scripts and all configurations of the remote action, requiring you to re-sign it after the update. Therefore, for remote actions installed from the library and system remote actions, Nexthink recommends against making any modifications other than re-signing the script.
Refer to the Writing scripts for remote actions on Windows and Writing scripts for remote actions on Mac documentation for more information.
Remote action scripts have a 600 KB maximum size limit:
Up to 50 inputs with a maximum total of 30 KB characters.
Up to 50 outputs with value limits depending on the type.

Parameters
You can specify up to 50 inputs required for the script's execution. You have the option to define a list of permitted parameter values and enable users to provide a custom value during execution.
Name: The name that appears to the user when the system asks for a parameter value.
Description: A meaningful description of the parameter.
Value: List of possible values for the parameter, one value per line. At least one value is required. The value on the first line is the default value option.
Allow the user to enter a custom value: Allow users to specify a custom parameter value other than those included in the list.
Outputs
Define up to 50 outputs of the remote action.
Name: The name that appears when the system displays remote action outputs in investigations and dashboards.
Description: A meaningful description of the output parameter.
Type: The data type of the parameter.
Advanced Configuration
Choose to run the script as a local system user (default), as an interactive user or as a service:
Local system user: Use this for tasks that require system rights, for example to uninstall software, or get the value of system information like drivers or registry keys.
Interactive user: Use this for actions executed for a specific user, like getting the size of their recycle bin, or closing an application using a campaign. If these were to be run as Local system user they would return the size of the system user recycle bin, or would try to close applications used by the system instead of the user logged into the device.
Collector runs the script only once a user logs in to the device. Until then, the execution reports the
waiting_on_userstatus instead of failing.The script runs in the context of the user logged in when the remote action reaches the device. If nobody is logged in, it runs for the first user to log in afterward.
Collector reports the name of the user that ran the script, so you can identify the execution context in investigations and dashboards. The username appears only once the script runs.
Executions waiting for a user expire one week after the request is created.
Service: Use this to configure the remote action to run within a dedicated service. For example, remote action can run on a Windows server (proxy) using a service account that has the necessary permissions to update Active Directory. Running as a service is only supported on Windows devices and requires the use of a Windows script (PowerShell). To use this feature, follow specific steps on the target device to create the service. In the service name field, you need to specify the value of the
--service-nameparameter used during service setup.
An interactive user execution runs for whichever user logs in first. On devices shared by multiple users, the executing user may differ from the intended one. Refer to Executing remote actions for more information on tracking those executions.
Set the time-out for the script (in seconds). If the remote action cannot complete its action within the allotted time the system will terminate the script.
Refer to the in-product documentation for more information. You can find it in the side panel menu.
Last updated
Was this helpful?