Another script to export the event logs, copy the grid log files, names the files and puts them in a folder named server name:
In this case the script is running against a server list, servers.txt, it calls this script against the servers.txt file which is declared as %1%. It uses the tool psloglist from sysinternals/microsoft.com
- tasklist -s %1%
- psloglist \\%1% application -s >logfileapp.csv
- psloglist \\%1% system -s >logfilesys.csv
- ren logfileapp.csv %1%_app.csv
- ren logfilesys.csv %1%_sys.csv
- md logs
- md logs\work
- md logs\temp
- copy %1%_app.csv logs
- copy %1%_sys.csv logs
- erase %1%_app.csv
- erase %1%_sys.csv
- xcopy /E \\%1%\c$\”Program Files”\DataSynapse\Engine\work logs\work
- xcopy /E \\%1%\c$\windows\temp\06S* logs\temp
- erase logfileapp.csv
- ren logs %1%
- rd logs


