eventvwr: el Visor de eventos de Windows
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.
Abrir Visor de eventos
eventvwr
PowerShell — Últimos 20 errores del sistema
Get-WinEvent -FilterHashtable @{LogName="System"; Level=2} -MaxEvents 20 | Format-List TimeCreated, Message
Errores críticos de las últimas 24 horas
$desde = (Get-Date).AddHours(-24)
Get-WinEvent -FilterHashtable @{
LogName = "System"
Level = 1,2
StartTime = $desde
} | Select-Object TimeCreated, LevelDisplayName, Message
Inicios de sesión fallidos (ID 4625)
Get-WinEvent -FilterHashtable @{LogName="Security"; Id=4625} -MaxEvents 50 | Format-List TimeCreated, Message
Exportar log a CSV
Get-WinEvent -LogName Application -MaxEvents 1000 | Export-Csv C:\logs_app.csv -NoTypeInformation
IDs de eventos clave a monitorear
| 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 |
Monitoreo continuo: Pide a Cerewro "Analiza los eventos del último día y dime si hay algo preocupante". La IA revisa System, Application y Security, agrupa por tipo y destaca anomalías.