Executive Summary:
| Windows PowerShell lets you easily access Windows event log information, integrate event-related commands into your PowerShell scripts, and write ad hoc event commands at the PowerShell command prompt. You can access event log information from local computers by using the get-eventlog cmdlet and from remote computers by creating a system.diagnostics.eventLog object that connects to a specific computer and event log. |
One of the many benefits of Windows PowerShell is that you can use it to easily access event log information and integrate that information into the PowerShell pipeline. You can incorporate event-related commands into your PowerShell scripts and write ad hoc event commands at the PowerShell command prompt.
With PowerShell, you can access event log information from both local and remote computers. However, the process is different for the two. To access local event information, you use the get-eventlog cmdlet. To access remote information, you create a system.diagnostics.eventLog object that connects to a specific computer and event log. Let's take a look at both, starting with local access. . . .

