To create a custom field in NinjaOne go to
Administration > Devices and select either
Role Custom Fields or
Global Custom Fields then select
Add.
- Role Custom Fields are custom fields that are specific to a device role.
- Global Custom Fields are custom fields that are applicable to all devices and/or to a location and/or organisation
Make sure you add the fields to the roles you want to use them in at
Administration > Devices > Roles (for role custom fields).
When you create your custom field you need to make sure that you set the
Scripts permission to ensure that you can read or write to the field from your scripts - as appropriate for the script you're using.