Hi,
Is it possible to create a new zone using nxshell in version 3.5?
Thanks.
nxshell allows to do anything the management console can do.
Zone creation should be similar to node creation (see examples here: https://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations#Create_Container_and_some_nodes)
you just need to specify another object class
Thanks. I will give that a try and post my code snippet when I get it working.
Yep - worked like a charm!
parentId = objects.GenericObject.NETWORK # Entire Network root
cd = NXCObjectCreationData(objects.GenericObject.OBJECT_ZONE, "Sample Zone", parentId);
zoneId = session.createObject(cd) # createObject return ID of newly created object
print '"Sample Zone" created, id=%d' % (zoneId, )