Follow

Powershell as plugin monitor script

Question:

Can I use powershell to create plugin monitor script?

Answer:

Yes, you can run basic powershell scripts but you have to run it through a wrapper batch file.

Here is the example code:

@echo off

rem This will create the drive, path and filename variable (e.g "C:\Program Files (x86)\Traverse\plugin\monitors\filecheck\isfile.py")
SET script=%~d0%~p0%~n0.py
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

 

Replace 'script.ps1' for the right script name.

 

Attached the same example code.

 -

For more information about custom plugin please review:

TCP connections plugin monitor

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.