You can run 探花大神 commands to execute scripts on fleets of machines through 探花大神's 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 devices 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. Several standard commands are already available to you. You can also create new commands manually or from a command template. Using an existing command template to create a command helps you quickly and efficiently update your devices.
From the Commands page, you can quickly run or delete a command.
Considerations:
- 探花大神 uses the Windows NT\Authority System account to run commands on remote systems, preventing the use of commands that require a user context to run.
- To run a command with user context, such as making changes to the HKEY_CURRENT_USER registry hive to implement a custom group policy, use one of the custom command templates titled, 鈥淲indows - Run As Signed In User Template | v1.1 JCCG".
- The execution time for scheduled and repeating launch events corresponds with the target system's time zone.
- The timestamps in the Command Results window display the current time on the device where the command ran. If you wish to view the time in UTC, select the Display Timestamps in UTC checkbox. Your time preference is saved across sessions until you change it.
- When running commands for macOS, you might get a result code of 1 with a log message of Operation Not Permitted. This might indicate that the 探花大神 agent needs Full Disk Access permissions to successfully run the command. See Grant Full Disk Access Permissions to the 探花大神 Agent for MacOS.
Prerequisites:
- You need a managed device running on a supported OS to create a command.
- You need to create device groups before you create a command. See Create a Device Group.
Creating a Command Manually
A manual command is run once and the Time To Live setting controls the queue timeout based on your requirements.
To create a new command manually:
- Log in to the .
- Go to DEVICE MANAGEMENT > Commands.
- Click ( + ), then choose Command.
- On the Details tab, enter a name for the new command. This is the name shown in the sortable list view of commands.
- For Type, select Linux, Windows, or Mac.
- Linux: Select the Run As user account that will run the command.
- Windows: Commands will be run as the LocalSystem account and optionally can be run as PowerShell.
- Mac: Select the Run As user account that will run the command.
- For Command, type or paste a script. The script can be in any language that your servers can execute.
- For Event, choose a method to launch the command:
- Run Manually - Execute this command from the Commands tab. To quickly execute a command manually, click Run Now next to the command's name in the Commands page.
- Run as Scheduled: Execute this command one time on the day and time that you specify in Schedule run for. This setting is useful for one-time operations that need to run during a change window. For more detail, see Understanding Scheduled Commands below.
- Run as Repeating: Execute this command on the interval you 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: Specify the 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).
- Run on Trigger (webhook): Commands set to run on trigger execute when a webhook is received from an external source. Enter the name of the trigger. See Use Command Triggers.
- Note: The execution time for scheduled and repeating launch events corresponds with the target device's time zone. In the Admin Portal, the event is labeled as Server Time.
- Run on Next Login: Run the command once on the next login of the 探花大神-managed user.
- Note: Login commands apply only to logins from the device login screen, and not screen unlock and terminal logins. Additionally, next login commands will not run when rebinding the command to a device where the command has been previously bound.
- Run on Every Login: Run the command on every login of the 探花大神-managed user.
- Note: Login commands apply only to logins from the device login screen, and not screen unlock and terminal logins.
- For Timeout After, enter a value in seconds. This determines how long the command can continue running before the agent will terminate it.
- For Time to Live (TTL) Settings, select a queue timeout to determine how long a command can sit in the queue before it's automatically removed. This is useful when configuring commands to run on devices that are temporarily unavailable.
- Use Smart Defaults - Choose a predefined default timeout of 1 Hour, 1 Day, 3 Days, 7 Days, or 10 Days.
- Set Custom Duration - Enter a duration using Days and Hours, with a minimum of 1 hour and a maximum of 10 days.
A 3-day default is set for all new commands, unless a custom timeout is configured here. TTL isn鈥檛 applicable to scheduled or repeating commands.
- (Optional) Click Upload File to attach a file to the command. You can upload multiple files.
- Select the file from your computer. You can just click the delete icon next to the file if you need to remove it. The file will stay in Pending status and be uploaded once you save the command.
- Once the file is uploaded, it's ready for the command to execute on the endpoint. You can update the file anytime, and the command will use the latest version during its next run.
- Select the file from your computer. You can just click the delete icon next to the file if you need to remove it. The file will stay in Pending status and be uploaded once you save the command.
If the file you're uploading exceeds 1 MB, and any of the associated devices are running agent version lower than 2.38.0, you may see a notification after clicking Save.
The command will be saved, but devices with agent versions older than 2.38.0 will not have access to file attachments over 1 MB. Upgrade your agent to ensure successful command execution.
Once the Command is saved, if you added a file exceeding 1MB and haven鈥檛 updated your devices to agent version 2.38.0 or higher, you will also see the following banner until the devices are updated or the file is removed.聽聽
- You can upload any file type, but unsigned .msi and .pkg files are not supported.
- Files can be up to 150 MB each.
- Each org is allocated up to 10GB of cloud storage space. This space is shared with Software Management. See Manage Software with 探花大神 Private Repository to learn more.
- For successful command execution, ensure your devices are running agent version 2.38.0 or higher.