Multiple choice technology

Which .Net Class is used in PowerShell to get the Event log information of a Local/Remote Server?

  1. System.Diagnostics.EventInstance

  2. System.Diagnostics.EventLogEntry

  3. System.Diagnostics.EventLog

  4. System.Diagnostics.EventLogEntryCollection

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

System.Diagnostics.EventLog is the .NET Framework class used in PowerShell to access Windows Event Logs. You can use it with Get-EventLog CmdLet or directly via New-Object. EventLogEntry represents individual log entries, and EventLogEntryCollection is a collection of entries - neither is the primary class for accessing log information.