Windows Operating Systems (Windows XP and later) ship with a built-in tool to check Event Logs on remote computers. There are three ways to check Event Logs on Remote Computers. This article explains how you can script PsLogList.exe and store Event Logs output in a CSV file.
Steps:
- Create a Text File: CompList.TXT
- Put all the Server names in this file
- Next, copy the following lines in a file and save it as DSLog.CMD
- ***START HERE***
- Echo Off
- SetLocal EnableDelayedExpansion
- FOR /F "Tokens=*" %%L IN (CompList.TXT) DO (
- SET ServerName=
- SET ServerName=%%L
- PsLogList.exe \\!ServerName! "Directory Service" -f e -s -d 7 -x > !ServerName!.CSV
- )
- ***END HERE***
http://technet.microsoft.com/en-us/sysinternals/bb897544.aspx