Displays the event logs of the local or a remote computer in Event Viewer.
Show-EventLog [[-ComputerName] [<String>]] [<CommonParameters>]
The Show-EventLog cmdlet opens Event Viewer on the local computer and displays in it all of the classic event logs on the local computer or a remote computer.
To open Event Viewer on Windows Vista and later versions of the Windows operating system, the current user must be a member of the Administrators group on the local computer.
The cmdlets that contain the EventLog noun (the EventLog cmdlets) work only on classic event logs. To get events from logs that use the Windows Event Log technology in Windows Vista and later versions of the Windows operating system, use the Get-WinEvent cmdlet.
You cannot pipe input to this cmdlet.
This cmdlet does not generate any output.
- Display event logs for the local computer:
PS C:> Show-EventLog
This command opens Event Viewer and displays in it the classic event logs on the local computer.
- Display event logs for a remote computer:
PS C:> Show-EventLog -ComputerName "Server01"
This command opens Event Viewer and displays in it the classic event logs on the Server01 computer.
The Windows PowerShell command prompt returns as soon as Event Viewer opens. You can work in the current session while Event Viewer is open. Because this cmdlet requires a user interface, it does not work on Server Core installations of Windows Server.