The 2011 Scripting Games Beginner Event 3: Use PowerShell to Report Event Log and ETL Log Details


2011 Scripting Games badge

Summary: Beginner Event 3 of the 2011 Scripting Games uses Windows PowerShell to report details about classic event and ETL logs.

About this event



Date of Event

4/6/2011 12:01 AM

Due Date

4/13/2011 12:01 AM

Event scenario

You are in charge of server monitoring at a medium-sized company that consists of three geographically dispersed sites and 50 servers. The servers are running a combination of Windows Server 2008 R2 and Windows Server 2008. You want to produce a report of all classic event logs and the ETL diagnostic logs that also exist. Your report should only list logs that are enabled. The list should be sorted by the last time the log was written to, and the most recent dates should be on top of the list. In addition, the report should state the size of the log, and whether or not it is a classic log. A sample output is shown in the following image.

Image of command output

Design points

  • Your script does not need to run against a remote machine for the purposes of this scenario, but if it does you will score more points.
  • You only need to sort the list by the last time the log was written to, but if you also sort by log size and whether it is a classic log, you will score more points.
  • Your script only needs to display output to the console, but you can gain additional points for improvement on the output of your report.

2011 Scripting Games links

2011 Scripting Games: All Links on One Page

Submit your scripts on PoshCode

Support our Sponsors!

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at, or post your questions on the Official Scripting Guys Forum. Good luck as you compete in this year’s Scripting Games. We wish you well.

Ed Wilson, Microsoft Scripting Guy