GetAllNodes

GetAllNodes(currentObject): Array

Get list of all Node objects in the system as array. Only nodes the script has read access to are included.

If trusted object validation is enforced, currentObject must be given and only nodes that trust it are returned; without it the array is empty.

Table 1. Parameters

currentObject

NetObj

Optional. Execution context object ($object or $node in most cases).

Return

Array of node objects.

>>> for (n : GetAllNodes()) {
>>>   println(n.id .. " - " .. n.name);
>>> }

6766 - demo-netxms
6901 - Control Unit 1
6902 - Control Unit 2