Problem
You want to determine which event logs exist on a system.
Solution
To list event logs on a system, use the –List parameter of the GetEventLog cmdlet: PS >GetEventLog List
Max(K) Retain OverflowAction Entries Name
512 0 OverwriteAsNeeded 2,157 ADAM (Test)
512 7 OverwriteOlder 2,090 Application
512 7 OverwriteOlder 0 Internet Explorer
8,192 45 OverwriteOlder 0 Media Center
512 7 OverwriteOlder 0 ScriptEvents
512 7 OverwriteOlder 2,368 System
15,360 0 OverwriteAsNeeded 0 Windows PowerShell
Discussion
The –List parameter of the GetEventLog cmdlet generates a list of the event logs registered on the system. Like the output of nearly all PowerShell commands, these event logs are fully featured .NET objects—in this case, objects of the .NET System. Diagnostics.EventLog type. For information on how to use these objects to write entries to an event log.
Although the heading of the GetEventLog output shows a table heading called Name, the actual property you need to use in WhereObject (and similar commands) is Log.
For more information about the GetEventLog cmdlet, type GetHelp GetEventLog.