Skip to main content

Posts

Showing posts from December, 2020

Powershell command to get event logs

       To get Event Log List:            Get-Eventlog -list                To filter event by error type:            Get-Eventlog -LogName Application -EntryType Error               Parameters use to search event logs include: After - User specifies a date and time and the cmdlet will locate events that occurred after AsBaseObject - Provides System.Diagnostics.EventLogEntry for each event AsString - Returns the output as strings Before - User specifies a date and time and the cmdlet will locate the event that occurred  before ComputerName - Used to refer to a remote computer EntryType - Specifies the entry type of events (Error, Failure Audit, Success Audit, Information, Warning) Index - Specifies index values the cmdlet finds events from List - Provides a list of event logs UserName - Specifies usernames associated wit...