eventvwr abre la interfaz gráfica del Visor de eventos. Pero la forma más potente de trabajar con eventos en entornos automatizados es usando PowerShell con Get-WinEvent, que permite filtrar, exportar y analizar millones de eventos en segundos.
eventvwr
Get-WinEvent -FilterHashtable @{LogName="System"; Level=2} -MaxEvents 20 | Format-List TimeCreated, Message
$desde = (Get-Date).AddHours(-24)
Get-WinEvent -FilterHashtable @{
LogName = "System"
Level = 1,2
StartTime = $desde
} | Select-Object TimeCreated, LevelDisplayName, Message
Get-WinEvent -FilterHashtable @{LogName="Security"; Id=4625} -MaxEvents 50 | Format-List TimeCreated, Message
Get-WinEvent -LogName Application -MaxEvents 1000 | Export-Csv C:\logs_app.csv -NoTypeInformation
| ID | Log | Significado |
|---|---|---|
4625 | Security | Inicio de sesión fallido |
4624 | Security | Inicio de sesión exitoso |
7034 | System | Servicio terminado inesperadamente |
41 | System | Reinicio inesperado (Kernel-Power) |
1000 | Application | Aplicación fallida |