Writing scripts ain't like dusting crops, kid! While mistakes made won't have you bouncing through a supernova, they can still cause headaches and extra work. But now, you can dodge those hassles by using AI to generate and tweak scripts tailored to your needs. This saves you time and effort, boosting your efficiency and productivity.
How it works
How are the script recommendations generated?
We partnered up with OpenAI to generate scripts using AI within Atera. From a set of simple or complex instructions, you're now able to generate powerful scripts in no time. It's the perfect combination of simplicity and sophistication.
What do I add to the instructions?
To generate a script, enter the specific commands or instructions that you want the script to execute when run. These instructions could include advanced tasks such as running other programs, performing calculations, or manipulating files or data.
What are the examples?
The example script descriptions are the most cloned scripts in Atera's Shared Script Library. We've provided these examples if you need help or inspiration in writing out script descriptions. When you select an example, the script's description will automatically populate in the Describe what the script should do field.
Note: You can always tweak the generated instructions to suit your specific needs, before generating a script
What happens when I create a script using AI?
As with any other script, it will appear in the My Scripts tab on the Scripts page. From here, it can be edited, shared with the Shared Script Library, enabled for Copilot and Autopilot, or deleted. And of course, it can be assigned to automation profiles and threshold profiles.
Generate and edit scripts
After generating a script, you get to share its power — not just with your fellow technicians or the Atera community at large, but with your Copilot and Autopilot as well.
When generating scripts via:
- Copilot: script generator: The script name and description update automatically after generating a script, but won't automatically reflect any modifications made to the script, which must be done manually.
- Script editor: The script name and description will not update automatically to reflect changes made to the script. You can update them manually.
Note: We recommend reviewing and testing all generated scripts to ensure proper functionality.
via the script generator
To generate a script via the script generator:
1. Go to Admin > Monitoring and automation > Scripts.
The Scripts page appears.
2. Click Create script.
The Create script page appears.
3. Select the file type (.bat, .ps1, or .sh).
Note: We'll skip adding the script name and description as our trusty AI Copilot will populate those fields when generating the script.
4. Within Copilot: script generator, describe what the script should do. Then click Generate.
Note: You can select from any of the examples provided if you want to see example script descriptions.
The AI-generated script appears within the Script editor.
5. Make any necessary changes to the generated script.
6. Enable the script for Copilot and/or Autopilot. Learn more
7. Optionally, configure the following properties:
- Category: Enter the script category.
- Max script run time (in minutes): Enter the max run time (default is 10min).
- Arguments: Enter the script arguments.
- Run as: Choose System or Current user.
8. Click Create (top right of the page).
The script appears in the My Scripts tab, where it can be edited or shared to the Shared Script Library. You can also attach the script to automation profiles and threshold profiles
via the script editor
To generate a script via the script editor:
1. Go to Admin > Monitoring and automation > Scripts.
The Scripts page appears.
2. Select a script or click Create script.
The Create script page appears.
3. Enter the script name and select the file type (.bat, .ps1, or .sh).
4. Enter the script description.
5. Optionally, configure the following properties:
- Category: Enter the script category.
- Max script run time (in minutes): Enter the max run time (default is 10min).
- Arguments: Enter the script arguments.
- Run as: Choose System or Current user.
6. Within the Script editor, type "#" and describe what the script should do. Then press the Enter key.
7. Make any necessary changes to the generated script.
8. Enable the script for Copilot and/or Autopilot. Learn more
9. Click Create (top right of the page).
Note: You can easily modify the script using the same method used to create it — just add comments right in the script.
Test scripts
Test PowerShell scripts (generated by the AI Copilot or yourself) on your devices, ensuring your scripts perform flawlessly.
Note: Running this script will execute actions on your selected device. We recommend using a dummy or test device to safely test your scripts.
To test a script via the script editor:
2. Select a device from the dropdown menu.
Note: Only online devices will appear.
The device's PowerShell terminal will appear below the script window.
3. Click the run now icon ().
The script will execute on the selected device.