Kaseya Community

How to use Powershell in traverse

  • Get-ScheduledTasks.txt

    Hi Guys,

    I wanted to use powershell to have some queries in traverse but ran into some issues as powershell cannot be natively called from java engine traverse uses. We can only really call command prompt and perl. So I built a basic command prompt wrapper which you can use to call any powershell by just renaming the bat file to match your powershell script.

    Keep in mind traverse will only accept a integer/timeticks return to be able to be displayed but there are ways around this which I will share on another post.

    You will also have to rename the attachment to .bat or .cmd as the forum would not allow me to upload those extensions.

  • This is very helpful - thank you for your contribution. Just to clarify, this wrapper can be used to execute any PowerShell script by creating a new .bat or .cmd script with same name as the .ps1 file with same content from the attachment. For example, in order to use a PowerShell script names MyScript.ps1, create MyScript.cmd with same content and them call MyScript.cmd from the <rootScript> section of the plug-in definition.

    Regards - Rajib