Skip to content
GitHub

Healthcheck Windows (Cleaner)

Notebook de PowerShell para healthchecks básicos y avanzados en Windows. Cada sección explica el objetivo, comando y cómo interpretar resultados.


Objetivo: Detectar fallos recientes (hardware, drivers, servicios críticos) en el registro de eventos.

Errores últimos 7 días
$Days = 7
Get-WinEvent -FilterHashtable @{
LogName = 'System'
Level = 2 # 2 = Error (crítico)
StartTime = (Get-Date).AddDays(-$Days)
} -MaxEvents 50 |
Format-Table TimeCreated, Id, ProviderName, Message -AutoSize

Qué observar:

  • Errores repetidos (mismo Id + ProviderName) → patrón a investigar
  • Controladores / disk / ntfs / storport → posible riesgo hardware
  • Service Control Manager → servicios que no inician

Objetivo: Detectar sobrecalentamiento que pueda causar throttling.

Temperatura via WMI
Get-CimInstance -Namespace root/wmi -ClassName MSAcpi_ThermalZoneTemperature 2>$null |
Select-Object InstanceName, @{N='TempC';E={[math]::Round(($_.CurrentTemperature/10)-273.15,1)}}
Temperatura discos NVMe
Get-PhysicalDisk |
Select FriendlyName, MediaType, HealthStatus, @{N='TempC';E={$_.Temperature}} |
Format-Table -AutoSize

Umbrales:

  • ⚠️ CPU > 85°C sostenida → revisar pasta térmica
  • ⚠️ NVMe > 70°C sostenida → riesgo vida útil

Genera un reporte Markdown consolidado:

healthcheck_wrapper.ps1
$report = "# Healthcheck $(Get-Date -Format 'yyyy-MM-dd HH:mm')`n"
$report += "`n## Errores System (7d)`n"
$report += (Get-WinEvent -FilterHashtable @{
LogName='System'; Level=2; StartTime=(Get-Date).AddDays(-7)
} -MaxEvents 10 -ErrorAction SilentlyContinue |
Select-Object TimeCreated, Id, ProviderName, Message |
Out-String)
$report += "`n## Disco`n"
$report += (Get-CimInstance Win32_LogicalDisk -Filter 'DriveType = 3' |
Select DeviceID, @{N='Free%';E={[math]::Round(($_.FreeSpace*100)/$_.Size,1)}} |
Out-String)
$report += "`n## Servicios Detenidos`n"
$report += (Get-Service |
Where-Object { $_.Status -ne 'Running' -and $_.StartType -eq 'Automatic' } |
Select Status, Name | Out-String)
$report | Set-Content .\healthcheck_report.md
Write-Host "✅ Reporte guardado en healthcheck_report.md"