Topic
This article answers frequently-asked questions about using the Automation Library in NinjaOne.
Environment
NinjaOne Endpoint Management
Index
Select a question to review the answer:
- Will NinjaOne queue scripts that couldn’t run during scheduled automations?
- How long will pending scripts stay in the queue?
- What version of PowerShell does NinjaOne Automation use?
- Can I restrict or assign script access to specific technicians or users?
- Does NinjaOne officially support bash scripts?
- Will my script run as System or as the current user?
- If I edit a script in the library, will this affect existing scheduled scripts and tasks?
- What happens if I delete a script that is referenced in a scheduled script or task?
- Can I upload a script to run against both macOS and Windows devices?
- Can I view and edit the built-in scripts/actions?
- Is there a character limit for new categories that I create?
- How do parameters work with my custom scripts?
- What happens if I attempt to issue a reboot via a custom script?
- Is it possible to restore a deleted script?
- Are scripts encrypted when I transmit them from NinjaOne to an endpoint's local library?
FAQ
Will NinjaOne queue scripts that couldn’t run during scheduled automations?
Scheduled automations will not execute scripts unless the device is online at the time the action is scheduled. Instead, NinjaOne will cancel the script and log an activity to notify of this event.
How long will pending scripts stay in the queue?
NinjaOne will not remove or cancel queued scripts regardless of time.
What version of PowerShell does NinjaOne Automation Use?
The version that NinjaOne uses is dependent on what version of PowerShell is natively installed on the agent on which the script is being run. The agent determines the executing PowerShell version, rather than NinjaOne. Typically, PowerShell 2 and above is used, but you can find exceptions in the script notes.

Can I restrict or assign script access to specific technicians or users?
Yes. You can manage access from a technician role or account page through Permissions → Automation Library. Select the permission level you want the technician to have for all categories by default, or manage permissions for individual categories.

You can restrict installed and run auomations to categories by performing the following steps:
- In NinjaOne, navigate to Administration → Library → Automation.
- Open the Categories tab and click Create category.

- Enter a unique identifier for the Name and then click Create.
- Open the Automations tab.
- Move your mouse cursor over the script you want to add to a category and select the actions menu. Click Edit.

- Select the checkboxes for each category to which you would like to add the script, and then click Save.
Does NinjaOne officially support bash scripts?
NinjaOne does support bash scripts; however, it is not part of the scope of our Support Team to troubleshoot customer scripts, and we will not be able to determine if the root of the problem is the script itself.
Will my script run as the system or as the current user?
When you run a script on a device (whether it be via a scheduled task, a scheduled script, or ad hoc), NinjaOne will prompt you to specify whether you wish to run the script as the system, the current user, or using credentials available via your credential store.
If I edit a script in the library, will this affect existing scheduled scripts and tasks?
Yes. Any edits you make in the library will be propagated to all scheduled scripts or tasks that currently reference the script.
What happens if I delete a script that is referenced in a scheduled script or task?
NinjaOne will no longer reference the script in the scheduled script or task.
Can I upload a script to run against both macOS and Windows devices?
NinjaOne does not support scripts running against multiple platforms. However, you can upload a script for each Apple macOS and Windows platform separately.
Can I view and edit the built-in scripts or actions?
You can currently only view and edit the scripts that you created. You cannot edit native scripts that NinjaOne provides by default.
Is there a character limit for new categories that I create?
Yes. There is currently a 50-character limit for category names.
How do parameters work with my custom scripts?
For an explanation of parameters, refer to NinjaOne Endpoint Management: Automation Parameters and Environment Variables.
What happens if I attempt to issue a reboot via a custom script?
Since the NinjaOne agent is not able to plan for reboots issued via custom scripts, doing so may cause issues with the agent.
To resolve the issue, either delete the custom script in question or modify it to remove the lines in the script that issue a reboot. You can use NinjaOne's native reboot script to issue reboots on machines.
Is it possible to restore a deleted script?
It is not possible to restore deleted scripts. You must create them again.
Are scripts encrypted when I transmit them from NinjaOne to an endpoint's local library?
Yes. The transmission of a script from the server to the agent is encrypted, like all other communications between the NinjaOne servers and NinjaOne agent.