Uploading integration scripts to NinjaOne
In order for some scripts to run, they must be supplied with a registration token which identifies the Acronis customer tenant and protection plan (if selected), and/or the Acronis data center (DC) URL. The registration token is automatically generated by Acronis, and both values are stored in NinjaOne custom fields.
For more information on how to set up the custom fields in NinjaOne, see Creating custom fields.
To upload integration scripts to NinjaOne
-
Log in to NinjaOne.
-
Select
.
-
Select Library > Automation.
-
Click + Add > Import from file.
-
Locate folder to which you unzipped the downloaded script packages.
-
Select one of the script files to upload and click Open.
Whereas Windows follows the original convention of a carriage return plus a line feed (CRLF) for line endings, operating systems like Linux and Mac use only the line feed (LF) character. In order to prevent issues when running the script, avoid copying/pasting scripts to NinjaOne. Instead, import the scripts through the NinjaOne interface, the way they have been downloaded from the Acronis console or drag and drop the files.
-
Enter a Name for the script.
-
Enter a Description.
-
Select one or more Categories from the dropdown list.
-
Select the Language from the dropdown list (PowerShell for Windows and ShellScript for Linux).
-
Select the Operating System from the dropdown list.
-
Select the Architecture from the dropdown list.
(We recommend All). -
Create Parameters for the scripts, as follows:
Acronis_install_agent
Enter the Acronis Data Center URL, followed by a blank space, followed by the Acronis registration token.
For more information, see Generating a registration token.
The optional value for Protection Plan can be used in combination with this script to apply the selected protection plan.The parameter should look something like this:
https://eu8.acronis.com 79AE-07AD-440C
.Click Add.
As long as a registration token is generated for a specific customer tenant, the script will be applicable to devices, associated with this particular tenant. In order to be able to run the script for another customer tenant, the token parameter has to be updated or the script copied and supplied with a token value for each customer.
Acronis_scans
Add five parameters as follows:
backup
av_scan
malware_scan
vulnerability_assessment
patch_management
Acronis_manage_protection_plan
Add two parameters as follows:
-
Acronis registration token.
-
Acronis registration token, followed by a space, followed by
yes
.
For more information, see Generating a registration token.
The optional value for Protection Plan can be used in combination with this script to apply the selected protection plan.Acronis_last_antivirus_scan
(Windows only)
(Windows and MacOs only)
Add one or more (integer) parameters to represent the number of days since the previous antivirus scan event. For example, you could specify options of 1 day, 2 days, 5 days, and 1 week:
-
1
-
2
-
5
-
7
If you do not specify any parameters, the default value is 7.Acronis_last_malware_scan
(Windows and MacOs only)
Add one or more (integer) parameters to represent the number of days since the previous antivirus scan event. For example, you could specify options of 1 day, 2 days, 5 days, and 1 week:
-
1
-
2
-
5
-
7
If you do not specify any parameters, the default value is 7.All other scripts
No paramters are required.
-
Click Save, then Close.
-
Repeat steps 4 to 14 for all the scripts you want to upload.