Get-EventLog

Description

Gets events in the classic event logs of a local or remote computer.

Command
Get-EventLog
Examples
Get the 10 newest entries from the System log
Get-EventLog -LogName System -Newest 10
Get all Error entries from the Application log
Get-EventLog -LogName Application -EntryType Error
Parameters
Parameter Type Required Description
[-LogName] <String> string No Specifies the event log (e.g., Application, System, Security).
[-Newest <Int32>] string No Gets the specified number of the newest events in the log.
[-InstanceId <Int64[]>] string No Specifies the instance IDs of the events to get.
Command Info
Category: System Management
Type: Powershell
Views: 13
Status: Active
Tags
powershell event log windows troubleshooting