Batch file to extract data from SysOrb into csv format

Below script saved as a bat file in C:\Program Files\SysOrb Server can be used to extract data from SysOrb into a csv format. In below example the script is set to use demo.sysorb.com.
You need to change the name into your own SysOrb server's name or IP address.
A guide on how to use below script is provided below.

@echo off
set hr=%time:~0,2%
set hr=%hr: =0%

SET /P username=Username :
SET /P password=Password :
SET /P filename=Filename : 
SET /P ID=check ID : 
echo set Starttime and Endtime using the format YYYY-MM-DD-THH:MM:SS
echo.
echo EG. Starttime %date:~6,8%-%date:~3,2%-%date:~0,2%-T00:00:00
echo EG. Endtime   %date:~6,8%-%date:~3,2%-%date:~0,2%-T23:59:59
echo Or NOW        %date:~6,8%-%date:~3,2%-%date:~0,2%-T%hr%:%time:~3,2%:%time:~6,2%
echo.
SET /P Starttime=Starttime : 
SET /P Endtime=Endtime : 



sysorb-tool.exe -s demo.sysorb.com -l %username% -P %password% -f %filename% select -i %ID% -b %Starttime% -e %Endtime%

Place exstract.bat in C:\Program Files\SysOrb Server
Start up cmd and and run extract.bat

Type in administrator username and password for root SysOrb server as example below.Give your csv file a name in this case we call it test.csv.

The check ID you will find in SysOrb webinterface see below. In this example it is the incident log we want to extract, we here need the node id which you can find in the SysOrb webinterface as showed below. If it was data from a specific check you would like to withdraw then it would be “check=” that you needed.

Now we have all the information we need. Press enter and you will see below in cmd:

You will be given a predefined starttime and Endtime which you can use. You can also chose the exact time slot you need data from.
In this example we copied Starttime and Endtime.
Press enter and you will find the csv file in C:\Program Files\SysOrb Server. You can now use it to e.g. import the data into Excel.