NetXMS Support Forum

English Support => General Support => Topic started by: Dunbar on December 11, 2017, 04:54:26 PM

Title: Server Actions Remote Execute
Post by: Dunbar on December 11, 2017, 04:54:26 PM
Hi

I try to remote execute a powershell script triggert over event processing policy.
The action Type is " execute command on remote node via agent"  .

The agent config file looks like:
ActionShellExec = dienst.restart:C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe C:\Windows\system32\WindowsPowerShell\v1.0\dienstrestarttest.ps1

The powershell script "dienstrestarttest.ps1"  should restart the printer spooler service, but it doesn´t.

The alarm browser shows the event correct.

Title: Re: Server Actions Remote Execute
Post by: Victor Kirhenshtein on December 11, 2017, 05:07:44 PM
Hi,

please provide screenshot of your action configuration and rule that triggers it.

Best regards,
Victor
Title: Re: Server Actions Remote Execute
Post by: Dunbar on December 12, 2017, 04:06:44 PM
Hi
Screenshots from action conf and rule.
Title: Re: Server Actions Remote Execute
Post by: Victor Kirhenshtein on December 13, 2017, 12:25:35 PM
Hi,

are you sure that hostname will be resolved correctly? You may try to use %a macro instead that will be expanded into node's primary IP address, or reference to node by name using @%n construct (which is the only option if you are using agent-to-server connection).

Best regards,
Victor