I need a .bat file using which I can access the application logs of a remote server. I am using the psloglist.exe tool from sysinternals. I run the following command from a command prompt and get the desired output :
C:\scripts>psloglist.exe -n 5 application ultrabac8 \\<servername>
The output for the comand is as follows :
PsLoglist v2.51 - local and remote event log viewer
Copyright (C) 2000-2004 Mark Russinovich
Sysinternals - www.sysinternals.com
Application log on \\<Server Name>:
[200471] UltraBac8
Type: INFORMATION
Computer: <Server Name>
Time: 8/29/2014 3:40:09 AM ID: 3
All 2 Sets Completed Without Errors or Warnings.
I tried to create a batch file that would just allow us to enter the server name and then would execute the command :
@echo off
cls
set /p input="Enter Server Name : "
cls
echo.
echo ********%input%********
echo.
C:\scripts\psloglist\psloglist.exe psloglist.exe -n 5 application -o ultrabac8 \\%input%
echo.
Pause
THe script above is not executing. I think it might be an issue with the syntax. Please help me in getting this corrected.
Thanks everyone in advance.