2
votes

I am trying to limit the last 100 errors that have the same structure as an ip address( example {1,3} . \ D {1,3} . \ D {1,3} . \ D {1, 3 }) using get-eventlog. I get the output printed out which shows the last 100 events on the computer, but how can i structure the output and how do i get the error messages from eventlog in powershell?

Get-Eventlog -Newest 100 -LogName "Application"
1
What have you tried to do to accomplish your goals, and what errors are you getting?TheMadTechnician
I am trying to get the last 100 errors from using the eventlog in powershell. The errors are not being listed out, i only get listed out the last 100 eventsuser8746169

1 Answers

0
votes

You can use the parameter -EntryType to specify the type of log entries, that you are interested in.

Get-Eventlog -Newest 100 -LogName "Application" -EntryType Error