title: Batch Script to access application logs using Psloglist.exe
body: <p>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 :</p>
  
  <pre><code>C:\scripts&gt;psloglist.exe -n 5 application ultrabac8 \\&lt;servername&gt;
  </code></pre>
  
  <p>The output for the comand is as follows :</p>
  
  <pre><code>PsLoglist v2.51 - local and remote event log viewer
  Copyright (C) 2000-2004 Mark Russinovich
  Sysinternals - www.sysinternals.com
  
  Application log on \\&lt;Server Name&gt;:
  [200471] UltraBac8
     Type:     INFORMATION
     Computer: &lt;Server Name&gt;
     Time:     8/29/2014 3:40:09 AM   ID:       3
  All 2 Sets Completed Without Errors or Warnings.
  </code></pre>
  
  <p>I tried to create a batch file that would just allow us to enter the server name and then would execute the command :</p>
  
  <pre><code>@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
  </code></pre>
  
  <p>THe script above is not executing. I think it might be an issue with the syntax. Please help me in getting this corrected.</p>
  
  <p>Thanks everyone in advance.</p>