The command (ps1) returned an invalid return code: -196608
Posted: Tue Mar 01, 2016 3:57 pm
Hi,
I downloaded Nagios Core and setup a server (on ubuntu 14.04) and did monitor Windows machines (Win 8.1 and 2008 R2). I am facing an issue in calling powershell script from server to client. Installed NSClient on the windows machines and added all servers details in the server windows.cfg file, also added command definitions in the commands.cfg file.
While executing powershell scripts from server, I am getting below response :
The command (ps1) returned an invalid return code: -196608
NSCLIENT external scripts section-
[/settings/external scripts/scripts]
ps1 = cmd /c echo scripts\\test1 %ARGS%; exit($lastexitcode) | powershell.exe -ExecutionPolicy Bypass -File -command -
I checked configuration, both server and client side, did not find any issues with configuration. If I remove script from the script location(on client), I am getting response as Unknown command, which is correct. I checked port 5666 as well and it is listening commands from server.
Could you please help me to figure out why it is happening and what would be the resolution for this problem.
Regards,
Arvind
I downloaded Nagios Core and setup a server (on ubuntu 14.04) and did monitor Windows machines (Win 8.1 and 2008 R2). I am facing an issue in calling powershell script from server to client. Installed NSClient on the windows machines and added all servers details in the server windows.cfg file, also added command definitions in the commands.cfg file.
While executing powershell scripts from server, I am getting below response :
The command (ps1) returned an invalid return code: -196608
NSCLIENT external scripts section-
[/settings/external scripts/scripts]
ps1 = cmd /c echo scripts\\test1 %ARGS%; exit($lastexitcode) | powershell.exe -ExecutionPolicy Bypass -File -command -
I checked configuration, both server and client side, did not find any issues with configuration. If I remove script from the script location(on client), I am getting response as Unknown command, which is correct. I checked port 5666 as well and it is listening commands from server.
Could you please help me to figure out why it is happening and what would be the resolution for this problem.
Regards,
Arvind