Managing Event Logs

dmex

ɠɛɐǨ
Vista Guru
Gold Member
http://www.microsoft.com/technet/scriptcenter/scripts/logs/eventlog/default.mspx?mfr=true

Microsoft Corporation

You can list the contents of an event log, sort by source, group by message type and more. To get the a whole log use the following command: get-eventlog [log name] get-eventlog Application

If you wish to sort the records by source use this command: get-eventlog Application | sort Source You can also group the records by Source, it can take a while depending on the number of records, but it is handy! Just run:
get-eventlog Application | group Message

Now event logs can get quite large and hold thousands and thousands of records. You can use the -Newest ### switch to retrieve a set number of the latest events recorded And, of course, these can all be combined to get exactly what you are looking for.
get-eventlog Application -newest 100 | sort source
 
Last edited:

My Computer

Back
Top