Run Command

The Run Command task can be used to execute specific command line instructions on the client. The administrator can specify the command line input to run.

validation-status-icon-warning IMPORTANT

Commands are executed without access to desktop environment. As a result, execution of commands with requirements to application's GUI may fail.

You can use ecmd commands with Run Command task. Read the Knowledgebase article for more information.

Operating System

Command will run as user

Default working directory

Accessible network locations

Command will be run in

Windows

Local System

C:\Windows\Temp

Only locations in the current domain and available to user Local System

Command prompt (cmd.exe)

macOS

root

/tmp

Only if location is mounted and available to root user

Console

Basic

Enter basic information about the task, such as the Name and optional Description. Task Category and Task Type are pre-selected based on your previous choice. The Task Type (see the list of all Tasks) defines the settings and the behavior for the task.

Settings

Command line to run - Enter a command line you want to run on the client(s).

Working directory - Enter a directory where the command line above will be executed.

light-bulbEXAMPLE: How to run local script

To run a local script located on a client at C:\Users\user\script.bat follow these steps:

1.Create a new Client Task and select Run Command.

2.In the Settings section enter:

Command line to run: script.bat
Working Directory: C:\Users\user

3.Click Finish, create a trigger and choose target clients.

Summary

Review the summary of configured settings and click Finish. The Client Task is now created and a pop-up window will open. We recommend that you click Create Trigger to specify when this Client Task should be executed and on what Targets. If you click Close, you can create a Trigger later. To create a trigger afterward, select the client task instance and select Run on from the drop-down menu.

client_task_finish