• RSS
  • Twitter
  • FaceBook

How To Script PsLogList.EXE To Check Event Logs On Remote Computers

This article explains how you can script PsLogList.exe to check Event Logs on Remote Computers and save the output in the CSV format.

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***
Execute the script from a computer from which all the computers/servers mentioned in the CompList.TXT are reachable. The PsLogList command mentioned above gathers the Directory Services from each computer mentioned in the CompList.TXT and output is saved in !ServerName!.CSV file.Download PsLogList.exe from here:

http://technet.microsoft.com/en-us/sysinternals/bb897544.aspx

About Nirmal Sharma

Nirmal is a Microsoft MVP in Directory Services and working as a Technical Architect/Consultant. He has been involved in Microsoft Technologies since 1994 and followed the progression of Microsoft Operating Systems and software. He is specialized in Directory Services, Microsoft Clustering, SQL, MOM, Exchange and Citrix. In his spare time, he likes to help others and write "internal" technical articles, white papers and tips on various Microsoft technologies. You can contact him at nirmal_sharma@mvps.org.


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?