Query Event Viewer

Hello,

I am looking for a way to query event viewer to display ANY critical alerts generated within the last 7 days. I have over 30 servers and I want to create a scheduled task to run every day that way I can manage my servers my efficiently and fix any issues that are presented

Thanks!

April 20th, 2015 6:43pm

Hi,

Take a look at Get-WinEvent:

http://ss64.com/ps/get-winevent.html

If you're looking to query WS2003 machines, you'll need Get-EventLog instead:

http://ss64.com/ps/get-eventlog.html

Free Windows Admin Tool Kit Click here and download it now
April 20th, 2015 6:45pm

This forum is for scripting questions rather than script requests.

Please start by reading the following:

April 20th, 2015 7:37pm

Hello,

I am looking for a way to query event viewer to display ANY critical alerts generated within the last 7 days. I have over 30 servers and I want to create a scheduled task to run every day that way I can manage my servers my efficiently and fix any issues that are presented

Thanks!

Have you ever thought of learning how to write a script.  Scripts can be used by anyone to do pretty amazing things.  It just takes a bit of learning.  There are many tools on this site and there are many books you can get that will show you how to use Windows technologies and how to use scripting with Windows.

If you are one of those techno-challenged people then there are many consultants you can work with to help you get the information you seek.

You can also consider purchasing one of the many tools that extract event log data into usable reports.

Free Windows Admin Tool Kit Click here and download it now
April 20th, 2015 9:49pm

Very Helpful information, Thanks!
April 21st, 2015 10:46am

Cheers, you're very welcome.
Free Windows Admin Tool Kit Click here and download it now
April 21st, 2015 10:47am

This forum is for scripting questions rather than script requests.

Please start by reading the following:

April 21st, 2015 10:51am

I'm glad Mike's information was helpful. You should also consider jrv's advice and look at tools that can extract logs from multiple servers. I'm sure there's something out there that would get you good information without you having to write a script. I would recommend this, particularly if you're not familiar with scripting.

Free Windows Admin Tool Kit Click here and download it now
April 21st, 2015 11:12am

I would add that if you are an admin then learning how to manipulate the event log is critical to the job.  Third party tools are very helpful for many things but diagnostics and forensics are better handled by querying with a tool like PowerShell.   Mastering this takes even experienced admins and scripters some time but it is always worth the effort.

Start by reading the background on the design and function of the event logging system.

Here is a good place to start: https://msdn.microsoft.com/en-us/library/windows/desktop/aa385780%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

The Event Log is so important that it has its own forum here: https://social.msdn.microsoft.com/Forums/en-US/home?forum=etw

April 21st, 2015 11:13am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics