JumpCloud’s new AI Commands Builder allows you to generate command scripts from a single, simple prompt.
How it Works
You can generate scripts by simply describing what you want to do in plain English. For example, to find large files on a Windows machine, you can just type a prompt like
find all files larger than 1GB on Windows machine
The AI will then generate the appropriate command script for you. You remain in complete control, as you can review and edit the script before saving and deploying it to your devices. This lets the AI handle the heavy lifting while you ensure the final command is exactly what you need.
How it Helps
- Saves Time and Increases Efficiency: Instead of spending time manually writing scripts or searching for the correct syntax, you can get a functional script in seconds.
- Reduces Errors: The AI-generated code is less prone to simple syntax errors and typos, helping to ensure the commands run successfully the first time.
- Acts as a Learning Tool: By analyzing the scripts generated by the AI, you can better understand how to structure commands and write your own scripts in the future.
Limitations
While incredibly powerful, this feature is an assistant, not a replacement for your expertise. You must keep the following in mind:
- Always Review the Script: While the AI can quickly generate a script, you should always review it before you run it.
For example, if you ask the AI to delete all user profiles, it might create a script that accidentally removes essential system accounts. To prevent this, you would need to manually edit the script to exclude critical accounts likeSYSTEM
orAdministrator
. - AI Hallucinations: The AI can occasionally generate plausible-looking but completely incorrect commands or information. Always verify the script's logic and syntax.
- Clarity is Key: The quality of the output is directly related to the clarity of your prompt. Vague requests may lead to generic or inaccurate scripts. Be as specific as possible to get the best results.
For example - "list all users on the device" vs. "list all users except for administrators".
Generating Command Scripts with AI
You can generate command scripts with AI while creating a command manually.
- Log in to the JumpCloud Admin Portal.
- Go to DEVICE MANAGEMENT > Commands.
- Click ( + ), then choose Command.
- In the Details section, enter a name for the new command. This is the name shown in the sortable list view of commands.
The Description field will be automatically updated once the script is generated with a summary of the script’s function. This is updated every time you generate the script.
- 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.
- In the Generate Script with AI section, simply describe what you want to achieve with the command in the text box. The more detail you provide, the better the AI can generate your script.
- Click Generate.
The AI will create a basic version of the script and add a summary of the script’s function in the Description field.- Use the Undo & Redo icons to switch between different versions of the script.
- You can also copy the script for use later.
Review the generated script and verify the logic and syntax. If you want to regenerate the script, update the prompt and click Generate.
8. Once you have your final version of the script, proceed to step 7 in Creating a Command Manually to complete the command setup.