EventLog
EventLog stores log information for the whole system via Event Tracing for Windows (ETW). For troubleshooting purposes, it is always important to take a dedicated look at the logs to find further information. PowerShell makes this very easy for us with two cmdlets: Get-EventLog and Get-WinEvent. Get-WinEvent is the newer cmdlet, which also allows you to retrieve events from the applications and services logs and uses server-side filtering. Get-EventLog returns objects of the type System.Diagnostics.EventLogEntry, and Get-WinEvent returns objects of the type System.Diagnostics.Eventing.Reader.EventLogRecord. There are significant differences in the properties, as the Source becomes ProviderName, the EntryType becomes LevelDisplayName ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access