Script to activate unsupported DCIs

Started by Andrew, December 12, 2017, 03:22:02 AM

Previous topic - Next topic

Andrew

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

Tatjana Dubrovica

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