A failure would be logged in your nxlog.log

Suggest you try a simple powershell script that just takes a single word as
an argument, and see if that works. It would prove whether calling out to
powershell works.

My biggest concern would be passing JSON as an argument.

On Friday, 22 August 2014, Amit Dattani <m...@amitdattani.com> wrote:

> Hi,
>
> Have installed nxlog and I would like to call an external script and pass
> the contents of £raw_event as JSON to the script. nxlog is installed on a
> Windows Server and so powershell is my tool of choice.
>
> How can I call powershell and the relevant .ps1 script file and pass the
> $raw_event as JSON to the .ps1 file. I am trying this, without any luck.
>
> Exec  exec_async("c:/windows/system32/windowspowershell/v1.0/powershell.exe",
> "C:/location_of_script/script.ps1", $raw_event );
>
> This is being called in the output section and I have declared the
> extension exec module with xm_exec.
>
> Any help would be great.
>
> Thanks,
>
> Amit
>


-- 
-- 
Cameron Kerr <cameron.kerr...@gmail.com>
See my blog at http://distracted-it.blogspot.co.nz/  (previously
http://humbledown.org/)
Skype me on cameron.kerr.nz
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to