NetXMS Support Forum

English Support => General Support => Topic started by: richard21 on April 11, 2025, 02:47:13 PM

Title: NXSL Agent Commands
Post by: richard21 on April 11, 2025, 02:47:13 PM
HI,

I currently use the AgentExecuteCommand function in a NXSL script to run an Agent command I notice that this is now deprecated what the new function?

Regards
Richard
Title: Re: NXSL Agent Commands
Post by: Filipp Sudanov on April 11, 2025, 03:35:16 PM
Hi,

These are now executeAgentCommand and executeAgentCommandWithOutput methods of Node class
https://www.netxms.org/documentation/nxsl-latest/#_instance_methods_18

In overall we tend to migrate from functions to object methods - this make a cleaner code and we can also list methods available on an object - see an example here: https://www.netxms.org/documentation/nxsl-latest/#class-class
Title: Re: NXSL Agent Commands
Post by: richard21 on April 11, 2025, 05:02:39 PM
Hi Filipp thanks for that I will look to migrate our scrips over

Cheers