Updated 05/15/2017 Also works for multiple computers version 6.2

* The computer sends the email for all HTML file inside the folder, so for daily purposes, it won't work well. So in this version, it implements a filter that matches the current day so it will send just the files for the current date.

Updated 05/15/2017 Also works for multiple computers version 6.0

* Versión 5 worked by creating HTML4 Transactional (so it wasn't just HTML5), Corrected to work with HTML5 specifications.

* Simple HTML5 file by a computer that holds all 3 logs (System, Application, and security), in the previous version you had 3 files for each log (one for the system, one for the application and one the for security).

* Rework on Several functions to make separation of concerns (One function that does a specific functionality). In previous, I had one function that gets the query and does the HTML file.

* Responsible Table with 90% width.

* Ability to send the reports by email (Required to update the SMTP Server parameter in line 65 for your local SMTP server, or use the -SMTPserver "mail.domain.com" option, also modify lines 80 and 81 for mailto and mailfrom)

* Ability to provide a TxT file with the name of the computers (one computer for line, and send them all by email)

Updated 05/13/2017

*  Version 5.0

* Added cleaning up of variables.

* New Look and feel of the web using JCS colors.

* Responsible Table with 90% width.


Updated 07/27/2016

* Added Optional parameters 

 - Days from 1 to 1865 (5 years) ( N days)

 - Computer: In case you want to run the script on a different computer (domain admin privileges required)

 - Switch "AddInformation" : Default will bring errors and warnings in the logs, with this option brings all 3 (information,warning and errors).

 - Switch "AddSecurity" : By Default, it looks up into the Application and Security Logs, with this options enables the query in the Security logs as well.


* The scripts requires a PowerShell console with elevated privileges since you're accessing the logs of the computer.


* Added several functions including log and notification progress in log queries.


* No more infinite HTML files with the same error:

        - Added Frequency field, this is the number of repetitions of this error during the days.

        - Added FirstTime field, this is the date when the error was recorded the first time, during the days of query       

 - Added LastTime field, this is the date when the error was logged last time.


* Brings More useful information for this New forms to run:




#same as: 
.\GetEventErrorsAAS.ps1   -Days 3 -computer "." -AddInformation:$false -AddSecurity:$false
This brings the default values for the parameters Days = 3 and computer "." (localhost). This will check the logs for the application and system logs.
 Bring Informational Events Also:
.\GetEventErrorsAAS.ps1  -AddInformation
#Same as
.\GetEventErrorsAAS.ps1  -Days 3 -computer "." -AddInformation
#Same as 
.\GetEventErrorsAAS.ps1  -Days 3 -computer "."-
 Bring Security Logs:
 Bring Informational Events and Security Logs also:
.\GetEventErrorsAAS.ps1  -AddInformation -AddSecurity 
#same as 
.\GetEventErrorsAAS.ps1 -Days 3 -computer "."-AddInformation -AddSecurity 
 Now you won't get every single event in the event log, you will get just the 1st date and the last and the number of repetitions. No more infinite HTML file with the very same errors repeating once and again.



Updated 06/10/2015


Updated to get the last 3 days of logs until the moment that you execute the script.

Get the 3 principal logs: System, Application, Security in an HTML+CSS3 nice look.

Tested on Windows server 2003 R2 (with no problems)

Have you ever wanted to easily check the errors and warnings in the systems and applications logs of your preference in your actual system or any server?


This script runs and in a few seconds, you can have all the errors and warnings from your system log (default) or any event view log in a nice looking HTML file.


Please do not forget to rate this script or visit my site at j0rt3g4.com


UPDATED 05/27/2015

* Added the 3 main logs for windows: System, Security, Application, it can search for the las N days.

* Updated CSS file to get a nice look and feel using the latest technology (CSS3).

And here's the output of my computer