You can run JumpCloud® commands to execute scripts on fleets of machines through JumpCloud's system agent. You can deploy files, schedule maintenance activity, or install software on endpoints in PowerShell, bash, shell, and more. Commands can run across one or more systems in parallel and retrieve command results (including stdout, stderr, and exit codes).
Commands let you quickly and easily automate tasks across multiple servers, launch those tasks based on a number of different types of events, and get full auditing of all command results.
Before you configure commands to execute:
- You must have active systems running on a supported OS to create system policies. See our System Getting Started Guide before you get started with commands.
- You must have defined system groups to create commands. See Getting Started: Groups.
This KB covers:
- Log in to the JumpCloud Admin Portal: https://console.jumpcloud.com/login.
- Go to Commands.
- Click ( + ). The New Command panel appears.
- Specify the following Details for the new command:
- Enter a Name for the command. Use this name to find the command in the Command list.
- Select the operating system Type: Linux®, Windows® or Mac®.
- Select the role or user you want to the run the command as (Run As):
For Linux and Mac systems:
Select the role or user you want to run the command asS
For Windows systems:
Commands will run as the LocalSystem account role. Optionally, you can run the command as Windows Powershell.
- Type or paste a script into the Command text box. The script can be in any language that your servers can execute.
- Select the launch event. See Launch Event.
- Optionally, modify the timeout value. In the Timeout After field, specify the amount of time (in seconds) after which the command should stop trying to execute. The default timeout value is 120 seconds.
- Optionally, click Upload File to upload a file to the system. See Files.
- Click the System Groups tab to set the specific system groups on which this command will execute.
- Click the Systems tab to set the specific systems on which this command will execute.
Note: Be aware that commands only execute on compatible systems. For example, if you connect a Mac command to a Linux system, it won't run on the Linux system.
- Optionally, click the Command Runners tab to elect a user as a Command Runner with access to run the command. By default, admins can run commands on all systems.
- Click save command.
- - commands set to run manually can be executed from the Commands list. To run a command manually, click run now next to the command's name in the Commands list.
- - commands set to run as scheduled execute one time on the day and time that you specify on the Schedule run for field. This setting is useful for one-time operations that need to run during a change window.
- commands set to run as repeating execute on the interval you specify. Specify:
- Command repeats by - specify when the command should repeat - You can select that it repeat by a specific Minute / Hour / Day / Week / Month.
- Repeat every N days - specify the number of days (N number of days) after which the command should repeat.
- Run at - specify the time at which the command should run. Enter the time in the 24-hour format: HH:MM, such as 13:30 (1:30 PM), or 03:30 (3:30 AM).
- webhook is received from an external source. Specify the Trigger Name. Learn about command triggers. - commands set to run on trigger execute when a
Upload one or more files to push to the server before the command executes. The file is pushed immediately, before the command executes. As such, you can update the files anytime and know that the next time your command runs it will have the latest update.
There are no file type restrictions. However, there is a 1MB size limitation per file attachment and in the command results logging.
JumpCloud Commands Gallery.
Find More Information
Find more information about commands in the JumpCloud Knowledge Base Commands section.