Adding a Script to Barracuda RMM
To set up tasks to use custom scripts, you must first add the scripts you need to the script library and specify any metadata for the script. This includes the name, underlying script file, category, version, minimum Barracuda RMM version, author, description, and all the parameters.
In Service Center, clickย Automationย >ย Library.
Clickย Newย Script.
In theย Script Nameย box, type a name for the script.
In theย Versionย box, type a number.ย
Versions for scripts must be in the form of <num>.<num>[.<num>[.<num>]], though only a single number is required.In theย Authorย box, type the author name.
Clickย Browseย and locate the script file or the .ZIP file, and then clickย Open.
If the script file you added was a compressed file (such as a .ZIP), then select the starting file from theย Starting Fileย list.
The starting file in the .ZIP file must be at the root level of the .ZIP file and have a file extension that is recognized by Barracuda RMM.Select a category from the list or type a new one.
Script categories allow for organization of scripts. A category can be created by typing in a new name. If you type a new name, Barracuda RMM creates a new category.In theย Minimum Barracuda RMM Versionย box, type the version of Barracuda RMM that this script supports.
By default, the Minimum Barracuda RMM Version is not automatically populated with the current version of Service Center, but this is usually the value you want to enter. If you need to specify that it only works with the current version, type the current version number. If the current version is entered, the script is sent to Onsite Managers that are not the specified version number but stay in a "Pending Upgrade"ย state until Onsite Manager is upgraded or the schedule expires.
You can locate Barracuda RMM build numbers in the correct format by clickingย Helpย >ย Aboutย Managerย check box.
When there is a new version of a script, Onsite Manager checks the minimum version and determines whether to download the file from Service Center.If you want the script to run on Onsite Manager, select theย Run on Onsite Managerย check box.
If the script must run without another dedicated execution script running, select theย Dedicated executionย check box.
In theย Target Typeย area, do the following:
To specify that the script can run on any platform type, select the Any platformย option button.
To specify that the script can run on specific platforms, select theย Specificย platformย option button, and then select the check box beside the operating systems on which the script will run.
In theย Descriptionย box, type a description.
This description is shown to users when they create tasks for the script. It is a good idea to describe how to use any parameters for the script.
Now you are ready to add parameters to the script. If you do not want to add parameters, select theย No Parametersย option button.
To add parameters to a script using a command line
Barracuda RMM allows you to use scripts as if you were running them directly on the system using command lines. When adding parameters to a script, you can simply specify the parameters as if you were running them on the command line. For example, the following is a PowerShell command line parameter:
-server[ "http://someserver" |http://someserver/]-force
The format of command line parameters varies by scripting language.
Click theย Use Command Line Parametersย button.
To set a default value, in theย Default Valueย box, type the command.
Clickย Save.
To add an integer parameter
Click theย Use Parameter Listย button.
Clickย Add.
From theย Choose Parameter Typeย list, chooseย Integer.
Clickย OK.
To set a label for a script parameter, type a label in theย Parameterย Labelย box.
To identify this parameter as unique, in theย Parameterย Keyย box, type a unique identifier. This key is the key expected by the script.
To set the minimum and maximum values for a script parameter, type a minimum and maximum in the appropriate boxes.
To set a default value for the script parameter, type a default in theย Defaultย box.
To set this parameter as optional, select theย Optionalย Parameterย check box.
Clickย OK.
To add a string parameter
Click theย Use Parameter Listย button.
Clickย Add.
From theย Choose Parameter Typeย list, chooseย String.
Clickย OK.
To set a label for a script parameter, type a label in theย Parameterย Labelย box.
To identify this parameter as unique, in theย Parameterย Keyย box, type a unique identifier. This key is the key expected by the script.
To set the maximum length for the string parameter, type a length in theย Maximum Lengthย box.
To set a default value for the string parameter, type a default in theย Defaultย box.
To set this parameter as optional, select theย Optionalย Parameterย check box.
Clickย OK.
To add a file parameter
Click theย Use Parameter Listย button.
Clickย Add.
From theย Choose Parameter Typeย list, chooseย File.
Clickย OK.
To set a label for a script parameter, type a label in theย Parameterย Labelย box.
To identify this parameter as unique, in theย Parameterย Keyย box, type a unique identifier. This key is the key expected by the script.
To set this parameter as optional, select theย Optionalย Parameterย check box.
Clickย OK.
To add a flag parameter
Click theย Use Parameter Listย button.
Clickย Add.
From theย Choose Parameter Typeย list, chooseย Flag.
Clickย OK.
To set a label for a script parameter, type a label in theย Parameterย Labelย box.
To identify this parameter as unique, in theย Parameterย Keyย box, type a unique identifier. This key is the key expected by the script.
Provide a default value for the flag parameter, by either selecting theย Default Valueย check box for a true value, or leaving theย Default Valueย check box cleared for a false value.
Flag parameters must have a default value.Clickย OK.
To add a list parameter
Click theย Use Parameter Listย button.
Clickย Add.
From theย Choose Parameter Typeย list, chooseย List.
Clickย OK.
To set a label for a script parameter, type a label in theย Parameterย Labelย box.
To identify this parameter as unique, in theย Parameterย Keyย box, type a unique identifier. This key is the key expected by the script.
In theย Listย Entriesย box, type the first entry in the list to theย Addย uniqueย list entryย box, then click the plus signย .
When specifying items in a list, you can include content in the list that will not be shown to the user that is filling in the parameters, by using a pipe character (|) and then providing the hidden content after the pipe character. The value after the pipe character is passed to the script. For example, if a script takes one of several integer values, but you want to present string values to the user, you can enter the following:First Entry | 1Repeat step 7 until you have added all entries in the list.
Optionally, select an entry in the list, and use the up and down arrow buttons to move the entry in the list. The list items are presented to the user in the same order that they appear in theย List Entriesย box.
To select a default value for the list, select an entry from theย Choose a defaultย list.
To set this parameter as optional, select theย Optionalย Parameterย check box.
Clickย OK.
To add a password parameter
Click theย Use Parameter Listย button.
Clickย Add.
From theย Choose Parameter Typeย list, chooseย Password.
Clickย OK.
To set a label for a script parameter, type a label in theย Parameterย Labelย box.
To identify this parameter as unique, in theย Parameterย Keyย box, type a unique identifier. This key is the key expected by the script.
To set this parameter as optional, select theย Optionalย Parameterย check box.
Clickย OK.
To change the order of script parameters
After adding parameters to a script, you can change the order in which they appear to the user scheduling the task, by moving parameters up and down in the list.
Select the check box beside one or more parameters.
Click one of the following:
Moveย Up
Moveย Down
To delete a script parameter
Select the check box beside a script parameter.
Clickย Delete.
Contact Us
Barracuda Campus
Barracuda Support