QUESTION:
Can I use powershell to create plugin monitor script?
RESOLUTION:
Yes, you can run basic powershell scripts but you have to run it through a wrapper batch file.
Here is the example wrapper code:
@echo off
rem This will create the drive, path and filename variable (e.g "C:\Program Files (x86)\Traverse\plugin\monitors\filecheck\isfile.ps1")
SET script=%~d0%~p0%~n0.ps1
rem Without the echo command below stdin seems to be held open causing powershell not to terminate echo . | c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Unrestricted "& '%script%'" %* 2> c:\users\public\dump
Attached the same example wrapper code.
- Replace 'script' with the right script name.
For more information about custom plugin please review:
TCP connections plugin monitor
APPLIES TO:
All versions of Traverse