NetXMS Support Forum

English Support => General Support => Topic started by: wuwei on January 21, 2021, 11:09:25 PM

Title: Arbitrary commands execution
Post by: wuwei on January 21, 2021, 11:09:25 PM
How can I execute commands on remote nodes via agent after setting EnableArbitraryCommandExecution=yes ?
Title: Re: Arbitrary commands execution
Post by: Zebble on January 25, 2021, 11:25:43 PM
Good question.  Didn't realize this existed, and I see no other reference to it other than the nxagent sourcecode.  Might not be fully implemented?
Title: Re: Arbitrary commands execution
Post by: wuwei on January 26, 2021, 02:55:11 PM
Don't know if it is fully implemented but it is referenced in the appendix:
https://www.netxms.org/documentation/adminguide/appendix.html?highlight=enablearbitrarycommandexecution

I like netxms but the probem is the lack of documentation.
I've tried to have it working but it gives me a generic error of "Communication failure".

I ended up with a simple workaround: added an agent policy with a generic action and defined an agent command that executes the action with a parameter.

Now I can run arbitrary command on windows client without problems.

Title: Re: Arbitrary commands execution
Post by: Filipp Sudanov on January 27, 2021, 01:16:57 PM
It's not fully implemented. It adds System.Execute action (and also System.ExecuteInAllSessions on Windows), but System.Execute does nothing.
Updated docs.