Related PowerShell Functionality

As discussed, one of the main functions of Event Viewer is to quickly see filtered Event Log entries. Here are some ways to go about similar tasks with Windows PowerShell.

Get-EventLog

The Get-EventLog cmdlet gets the events in an event log, or a list of the event logs, on the local or remote computers.

Description

The cmdlet returns events and event logs on the specified computer (local or remote). This is useful when scripting searches for specific event message or ID. Creating reports for recent event messages is also facilitated by this command.

The cmdlet parameters provide the ability to refine the returned result set using any proerty values. The EventLog cmdlets work only on classic event logs. To get ...

Get Windows Server® 2012 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.