NetXMS Support Forum

English Support => General Support => Topic started by: Andrew on December 12, 2017, 03:22:02 AM

Title: Script to activate unsupported DCIs
Post by: Andrew on December 12, 2017, 03:22:02 AM
My goal is the write a script that I can run from the server console that will walk through a group of nodes in a particular container and activate DCIs that are currently disabled and showing as unsupported.

My first question, is this possible?

Second, I'd like to write a script that can run even with CheckTrustedNodes set 1.  My first problem is retrieving the root object.  I know I am suppose to use:

$r = FindObject("1",$object);

but $r is always null, and my thought is that I don't have permission to access the root object.  My user is part of the admins group.  Am I missing something here?  Andrew
Title: Re: Script to activate unsupported DCIs
Post by: Tatjana Dubrovica on January 31, 2018, 03:16:35 PM
I think it will be easyer for you to use NXShell script for this purposes. Examles cn be found there: https://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations