diff --git a/WindowsMaintenanceReport.ps1 b/WindowsMaintenanceReport.ps1 index 47f634a..45e2f90 100644 --- a/WindowsMaintenanceReport.ps1 +++ b/WindowsMaintenanceReport.ps1 @@ -1,793 +1,638 @@ -#requires -Version 5.1 - -<# -WindowsMaintenanceReport.ps1 - -Three report levels: - - Default Compact maintenance snapshot (target: under 20 lines) - -Mid Useful hardware/software/startup/driver inventory - -Full Everything, including networking, event logs, processes, - firewall, devices, DISM and SFC verification. - -Examples: - - .\WindowsMaintenanceReport.ps1 - .\WindowsMaintenanceReport.ps1 -Mid - .\WindowsMaintenanceReport.ps1 -Full - .\WindowsMaintenanceReport.ps1 -Mid -OutputDirectory C:\Temp - .\WindowsMaintenanceReport.ps1 -Full -EventLogDays 30 - -Remote execution from a trusted URL: - - irm 'https://example/WindowsMaintenanceReport.ps1' | iex - -For flags when executing downloaded source: - - $src = irm 'https://example/WindowsMaintenanceReport.ps1' - & ([ScriptBlock]::Create($src)) -Mid - -Administrator privileges are recommended but not required. -The script is read-only. Admin-only checks are skipped when unavailable. -Output streams live to the terminal and is simultaneously saved to a report. -#> - -[CmdletBinding()] -param( - [switch]$Mid, - [switch]$Full, - - [string]$OutputDirectory = '', - - [ValidateRange(1, 3650)] - [int]$EventLogDays = 7, - - [ValidateRange(1, 5000)] - [int]$MaxEventErrors = 100 -) - -$ErrorActionPreference = 'Continue' - -if ($Mid -and $Full) { - throw 'Choose either -Mid or -Full, not both.' -} - -function Test-IsAdministrator { - try { - $identity = [Security.Principal.WindowsIdentity]::GetCurrent() - $principal = New-Object Security.Principal.WindowsPrincipal($identity) - return $principal.IsInRole( - [Security.Principal.WindowsBuiltInRole]::Administrator - ) - } - catch { - return $false - } -} - -function Test-DirectoryWritable { - param([string]$Path) - - try { - if (-not (Test-Path -LiteralPath $Path)) { - New-Item -ItemType Directory -Path $Path -Force -ErrorAction Stop | Out-Null - } - - $testFile = Join-Path $Path ( - '.winreport_write_test_' + - [guid]::NewGuid().ToString('N') + - '.tmp' - ) - - [System.IO.File]::WriteAllText($testFile, 'test') - Remove-Item -LiteralPath $testFile -Force -ErrorAction SilentlyContinue - return $true - } - catch { - return $false - } -} - -function Write-Both { - param( - [System.IO.StreamWriter]$Writer, - [string]$Text = '' - ) - - Write-Host $Text - $Writer.WriteLine($Text) - $Writer.Flush() -} - -function Write-Section { - param( - [System.IO.StreamWriter]$Writer, - [string]$Title, - [scriptblock]$Script - ) - - Write-Both $Writer '' - Write-Both $Writer ('--- ' + $Title + ' ---') - - try { - $result = & $Script 2>&1 - $text = $result | Out-String -Width 240 - - if ([string]::IsNullOrWhiteSpace($text)) { - Write-Both $Writer '(no output)' - } - else { - $lines = $text.TrimEnd() -split "`r?`n" - - foreach ($line in $lines) { - Write-Both $Writer $line - } - } - } - catch { - Write-Both $Writer ('ERROR: ' + $_.Exception.Message) - } -} -function Get-InstalledPrograms { - $paths = @( - 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', - 'HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', - 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' - ) - - Get-ItemProperty $paths -ErrorAction SilentlyContinue | - Where-Object { $_.DisplayName } | - Select-Object DisplayName, DisplayVersion, Publisher, - InstallDate, InstallLocation | - Sort-Object DisplayName -Unique -} - -function Get-StartupRegistryEntries { - $startupKeys = @( - 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Run', - 'HKLM:\Software\Microsoft\Windows\CurrentVersion\RunOnce', - 'HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Run', - 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run', - 'HKCU:\Software\Microsoft\Windows\CurrentVersion\RunOnce' - ) - - foreach ($key in $startupKeys) { - if (Test-Path $key) { - $item = Get-ItemProperty $key -ErrorAction SilentlyContinue - - foreach ($property in $item.PSObject.Properties) { - if ($property.Name -notlike 'PS*') { - New-Object PSObject -Property @{ - RegistryPath = $key - Name = $property.Name - Value = $property.Value - } - } - } - } - } -} - -function Get-ProblemDevices { - if (Get-Command Get-PnpDevice -ErrorAction SilentlyContinue) { - Get-PnpDevice -PresentOnly -ErrorAction SilentlyContinue | - Where-Object { $_.Status -ne 'OK' } - } - else { - Get-CimInstance Win32_PnPEntity -ErrorAction SilentlyContinue | - Where-Object { $_.ConfigManagerErrorCode -ne 0 } - } -} - -function Get-DiskHealthSummary { - if (-not (Get-Command Get-PhysicalDisk -ErrorAction SilentlyContinue)) { - return 'Unavailable' - } - - try { - $physical = @(Get-PhysicalDisk -ErrorAction Stop) - - if ($physical.Count -eq 0) { - return 'No physical disks returned' - } - - $bad = @( - $physical | - Where-Object { - $_.HealthStatus -and - $_.HealthStatus -ne 'Healthy' - } - ) - - if ($bad.Count -eq 0) { - return 'Healthy (' + $physical.Count + ' disk(s))' - } - - return ( - ($bad | ForEach-Object { - $_.FriendlyName + ': ' + $_.HealthStatus - }) -join '; ' - ) - } - catch { - return 'Unavailable' - } -} - -$isAdmin = Test-IsAdministrator - -if ([string]::IsNullOrWhiteSpace($OutputDirectory)) { - $candidate = (Get-Location).Path - - if (Test-DirectoryWritable $candidate) { - $OutputDirectory = $candidate - } - elseif (Test-DirectoryWritable $env:TEMP) { - $OutputDirectory = $env:TEMP - } - else { - throw 'Could not find a writable output directory.' - } -} -elseif (-not (Test-DirectoryWritable $OutputDirectory)) { - throw "Output directory is not writable: $OutputDirectory" -} - -$mode = 'Compact' -if ($Mid) { $mode = 'Mid' } -if ($Full) { $mode = 'Full' } - -$timestamp = Get-Date -Format 'yyyyMMdd_HHmmss' -$computerName = $env:COMPUTERNAME -$reportName = 'windows_system_report_' + $computerName + '_' + $timestamp + '.txt' -$reportPath = Join-Path $OutputDirectory $reportName - -# $encoding = $encoding = [System.Text.Encoding]::ASCII -$encoding = New-Object System.Text.UTF8Encoding($false) -$writer = New-Object System.IO.StreamWriter($reportPath, $false, $encoding) - -try { - # ---------------------------------------------------------------------- - # COMPACT DEFAULT - # ---------------------------------------------------------------------- - if (-not $Mid -and -not $Full) { - $os = Get-CimInstance Win32_OperatingSystem - $system = Get-CimInstance Win32_ComputerSystem - $bios = Get-CimInstance Win32_BIOS - $cpu = Get-CimInstance Win32_Processor | Select-Object -First 1 - $gpus = @(Get-CimInstance Win32_VideoController -ErrorAction SilentlyContinue) - $disks = @(Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3") - $programs = @(Get-InstalledPrograms) - $startupRegistry = @(Get-StartupRegistryEntries) - $startupCommands = @(Get-CimInstance Win32_StartupCommand -ErrorAction SilentlyContinue) - $autoServices = @(Get-CimInstance Win32_Service -ErrorAction SilentlyContinue | - Where-Object { $_.StartMode -eq 'Auto' }) - $stoppedAuto = @($autoServices | Where-Object { $_.State -ne 'Running' }) - $problemDevices = @(Get-ProblemDevices) - $latestHotfix = Get-HotFix -ErrorAction SilentlyContinue | - Sort-Object InstalledOn -Descending | - Select-Object -First 1 - - $uptime = (Get-Date) - $os.LastBootUpTime - $ramTotalGB = [math]::Round($system.TotalPhysicalMemory / 1GB, 1) - $ramFreeGB = [math]::Round($os.FreePhysicalMemory / 1MB, 1) - - $gpuText = if ($gpus.Count -gt 0) { - ($gpus | ForEach-Object { $_.Name }) -join '; ' - } - else { - 'Unknown' - } - - $diskText = if ($disks.Count -gt 0) { - ($disks | ForEach-Object { - $size = [math]::Round($_.Size / 1GB, 0) - $free = [math]::Round($_.FreeSpace / 1GB, 0) - $pct = if ($_.Size) { - [math]::Round(($_.FreeSpace / $_.Size) * 100, 0) - } - else { - 0 - } - - $_.DeviceID + ' ' + $free + '/' + $size + 'GB free (' + $pct + '%)' - }) -join '; ' - } - else { - 'Unknown' - } - - $hotfixText = if ($latestHotfix) { - $date = if ($latestHotfix.InstalledOn) { - $latestHotfix.InstalledOn.ToString('yyyy-MM-dd') - } - else { - 'date unknown' - } - $latestHotfix.HotFixID + ' (' + $date + ')' - } - else { - 'Unavailable' - } - - $defenderText = 'Unavailable' - if (Get-Command Get-MpComputerStatus -ErrorAction SilentlyContinue) { - try { - $def = Get-MpComputerStatus -ErrorAction Stop - $rt = if ($def.RealTimeProtectionEnabled) { 'ON' } else { 'OFF' } - $sig = if ($def.AntivirusSignatureLastUpdated) { - $def.AntivirusSignatureLastUpdated.ToString('yyyy-MM-dd HH:mm') - } - else { - 'unknown' - } - $defenderText = 'Realtime ' + $rt + '; signatures ' + $sig - } - catch { - $defenderText = 'Unavailable' - } - } - - $biosText = $bios.SMBIOSBIOSVersion - if ([string]::IsNullOrWhiteSpace($biosText)) { - $biosText = $bios.Name - } - - Write-Both $writer 'WINDOWS MAINTENANCE SNAPSHOT' - Write-Both $writer ('Generated: ' + (Get-Date -Format 'yyyy-MM-dd HH:mm:ss')) - Write-Both $writer ('Computer: ' + $computerName + ' | ' + $system.Manufacturer + ' ' + $system.Model) - Write-Both $writer ('OS: ' + $os.Caption + ' | ' + $os.Version + ' build ' + $os.BuildNumber + ' | ' + $os.OSArchitecture) - Write-Both $writer ('BIOS: ' + $biosText) - Write-Both $writer ('CPU: ' + $cpu.Name + ' | ' + $cpu.NumberOfCores + 'C/' + $cpu.NumberOfLogicalProcessors + 'T') - Write-Both $writer ('RAM: ' + $ramFreeGB + 'GB free / ' + $ramTotalGB + 'GB total') - Write-Both $writer ('GPU: ' + $gpuText) - Write-Both $writer ('Storage: ' + $diskText) - Write-Both $writer ('DiskHealth: ' + (Get-DiskHealthSummary)) - Write-Both $writer ('Software: ' + $programs.Count + ' desktop programs; ' + (@(Get-AppxPackage -ErrorAction SilentlyContinue)).Count + ' AppX packages') - Write-Both $writer ('Startup: ' + $startupRegistry.Count + ' registry entries; ' + $startupCommands.Count + ' startup commands') - Write-Both $writer ('Services: ' + $autoServices.Count + ' automatic; ' + $stoppedAuto.Count + ' not running') - Write-Both $writer ('Devices: ' + $problemDevices.Count + ' reporting problems') - Write-Both $writer ('Update: ' + $hotfixText) - Write-Both $writer ('Defender: ' + $defenderText) - Write-Both $writer ('Uptime: ' + $uptime.Days + 'd ' + $uptime.Hours + 'h ' + $uptime.Minutes + 'm | Admin: ' + $isAdmin) - Write-Both $writer ('Report: ' + $reportPath) - - return - } - - # ---------------------------------------------------------------------- - # MID + FULL COMMON SECTIONS - # ---------------------------------------------------------------------- - Write-Both $writer 'WINDOWS SYSTEM / MAINTENANCE REPORT' - Write-Both $writer ('Mode: ' + $mode) - Write-Both $writer ('Generated: ' + (Get-Date -Format 'yyyy-MM-dd HH:mm:ss K')) - Write-Both $writer ('Computer: ' + $computerName) - Write-Both $writer ('User: ' + $env:USERNAME) - Write-Both $writer ('Administrator: ' + $isAdmin) - Write-Both $writer ('PowerShell: ' + $PSVersionTable.PSVersion) - Write-Both $writer ('Report: ' + $reportPath) - - if (-not $isAdmin) { - Write-Both $writer '' - Write-Both $writer 'NOTE: Script is not elevated. Admin-only diagnostics will be skipped.' - } - - Write-Section $writer 'OPERATING SYSTEM / COMPUTER / BIOS' { - Get-CimInstance Win32_OperatingSystem | - Select-Object Caption, Version, BuildNumber, OSArchitecture, - InstallDate, LastBootUpTime, LocalDateTime, - @{Name='TotalMemoryGB';Expression={[math]::Round($_.TotalVisibleMemorySize / 1MB, 2)}}, - @{Name='FreeMemoryGB';Expression={[math]::Round($_.FreePhysicalMemory / 1MB, 2)}} | - Format-List - - Get-CimInstance Win32_ComputerSystem | - Select-Object Manufacturer, Model, SystemType, - @{Name='TotalPhysicalMemoryGB';Expression={[math]::Round($_.TotalPhysicalMemory / 1GB, 2)}}, - Domain, PartOfDomain | - Format-List - - Get-CimInstance Win32_BIOS | - Select-Object Manufacturer, Name, SMBIOSBIOSVersion, - ReleaseDate, SerialNumber | - Format-List - } - - Write-Section $writer 'CPU' { - Get-CimInstance Win32_Processor | - Select-Object Name, Manufacturer, NumberOfCores, - NumberOfLogicalProcessors, MaxClockSpeed, - CurrentClockSpeed, LoadPercentage | - Format-List - } - - Write-Section $writer 'MEMORY MODULES' { - Get-CimInstance Win32_PhysicalMemory | - Select-Object BankLabel, DeviceLocator, - @{Name='CapacityGB';Expression={[math]::Round($_.Capacity / 1GB, 2)}}, - Speed, ConfiguredClockSpeed, Manufacturer, PartNumber | - Format-Table -AutoSize - } - - Write-Section $writer 'MOTHERBOARD' { - Get-CimInstance Win32_BaseBoard | - Select-Object Manufacturer, Product, Version, SerialNumber | - Format-List - } - - Write-Section $writer 'GPU / DISPLAY ADAPTERS' { - Get-CimInstance Win32_VideoController | - Select-Object Name, DriverVersion, VideoModeDescription | - Format-Table -AutoSize - } - - Write-Section $writer 'STORAGE / FREE SPACE / HEALTH' { - 'Logical volumes:' - Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" | - Select-Object DeviceID, VolumeName, FileSystem, - @{Name='SizeGB';Expression={[math]::Round($_.Size / 1GB, 2)}}, - @{Name='FreeGB';Expression={[math]::Round($_.FreeSpace / 1GB, 2)}}, - @{Name='FreePercent';Expression={ - if ($_.Size) { - [math]::Round(($_.FreeSpace / $_.Size) * 100, 1) - } - }} | - Format-Table -AutoSize - - '' - 'Physical disks:' - Get-CimInstance Win32_DiskDrive | - Select-Object Model, InterfaceType, MediaType, - @{Name='SizeGB';Expression={[math]::Round($_.Size / 1GB, 2)}}, - FirmwareRevision, SerialNumber, Status | - Format-Table -AutoSize - - '' - 'Storage health:' - if (Get-Command Get-PhysicalDisk -ErrorAction SilentlyContinue) { - try { - Get-PhysicalDisk -ErrorAction Stop | - Select-Object FriendlyName, MediaType, HealthStatus, - OperationalStatus, - @{Name='SizeGB';Expression={[math]::Round($_.Size / 1GB, 2)}} | - Format-Table -AutoSize - - if ($isAdmin) { - Get-PhysicalDisk | ForEach-Object { - '' - 'Reliability: ' + $_.FriendlyName - try { - $_ | Get-StorageReliabilityCounter -ErrorAction Stop | - Select-Object Temperature, Wear, - ReadErrorsTotal, WriteErrorsTotal, - PowerOnHours | - Format-List - } - catch { - 'Reliability counters unavailable: ' + $_.Exception.Message - } - } - } - else { - 'Detailed reliability counters skipped: not elevated.' - } - } - catch { - 'Storage health unavailable: ' + $_.Exception.Message - } - } - else { - 'Get-PhysicalDisk is unavailable on this system.' - } - } - - Write-Section $writer 'INSTALLED PROGRAMS' { - Get-InstalledPrograms | - Format-Table -AutoSize - } - - Write-Section $writer 'MICROSOFT STORE / APPX PACKAGES' { - if (Get-Command Get-AppxPackage -ErrorAction SilentlyContinue) { - Get-AppxPackage -ErrorAction SilentlyContinue | - Select-Object Name, Version, Publisher, Architecture | - Sort-Object Name | - Format-Table -AutoSize - } - else { - 'Get-AppxPackage is unavailable.' - } - } - - Write-Section $writer 'STARTUP REGISTRY LOCATIONS' { - $entries = @(Get-StartupRegistryEntries) - - if ($entries.Count -eq 0) { - '(no startup registry entries found)' - } - else { - $entries | - Sort-Object RegistryPath, Name | - Format-Table RegistryPath, Name, Value -Wrap -AutoSize - } - } - - Write-Section $writer 'AUTOMATIC SERVICES' { - Get-CimInstance Win32_Service | - Where-Object { $_.StartMode -eq 'Auto' } | - Select-Object Name, DisplayName, State, StartMode, StartName | - Sort-Object State, DisplayName | - Format-Table -AutoSize - } - - Write-Section $writer 'SIGNED DRIVERS' { - Get-CimInstance Win32_PnPSignedDriver | - Where-Object { $_.DeviceName } | - Select-Object DeviceName, Manufacturer, DriverVersion, DriverDate | - Sort-Object DeviceName | - Format-Table -AutoSize - } - - Write-Section $writer 'WINDOWS UPDATES / HOTFIXES' { - Get-HotFix -ErrorAction SilentlyContinue | - Sort-Object InstalledOn -Descending | - Select-Object HotFixID, Description, InstalledBy, InstalledOn | - Format-Table -AutoSize - } - - Write-Section $writer 'WINDOWS DEFENDER STATUS' { - if (Get-Command Get-MpComputerStatus -ErrorAction SilentlyContinue) { - try { - Get-MpComputerStatus -ErrorAction Stop | - Select-Object AntivirusEnabled, AntispywareEnabled, - RealTimeProtectionEnabled, BehaviorMonitorEnabled, - IoavProtectionEnabled, NISEnabled, - AntivirusSignatureLastUpdated, - AntispywareSignatureLastUpdated, - QuickScanAge, FullScanAge | - Format-List - } - catch { - 'Defender status unavailable: ' + $_.Exception.Message - } - } - else { - 'Microsoft Defender cmdlets unavailable.' - } - } - - Write-Section $writer 'NON-MICROSOFT SCHEDULED TASKS' { - if (Get-Command Get-ScheduledTask -ErrorAction SilentlyContinue) { - Get-ScheduledTask -ErrorAction SilentlyContinue | - Where-Object { $_.TaskPath -notlike '\Microsoft\*' } | - Select-Object TaskName, TaskPath, State | - Sort-Object TaskPath, TaskName | - Format-Table -AutoSize - } - } - - # ---------------------------------------------------------------------- - # FULL-ONLY SECTIONS - # ---------------------------------------------------------------------- - if ($Full) { - Write-Section $writer 'UPTIME' { - $os = Get-CimInstance Win32_OperatingSystem - $uptime = (Get-Date) - $os.LastBootUpTime - - New-Object PSObject -Property @{ - LastBoot = $os.LastBootUpTime - Days = $uptime.Days - Hours = $uptime.Hours - Minutes = $uptime.Minutes - } | Format-List - } - - Write-Section $writer 'STARTUP PROGRAMS' { - Get-CimInstance Win32_StartupCommand | - Select-Object Name, Command, Location, User | - Sort-Object Name | - Format-Table -Wrap -AutoSize - } - - Write-Section $writer 'STARTUP FOLDERS' { - $folders = @( - (Join-Path $env:APPDATA 'Microsoft\Windows\Start Menu\Programs\Startup'), - (Join-Path $env:ProgramData 'Microsoft\Windows\Start Menu\Programs\Startup') - ) - - foreach ($folder in $folders) { - '' - 'Folder: ' + $folder - - if (Test-Path $folder) { - Get-ChildItem $folder -Force -ErrorAction SilentlyContinue | - Select-Object Name, FullName, LastWriteTime | - Format-Table -AutoSize - } - else { - '(not present)' - } - } - } - - Write-Section $writer 'AUTOMATIC SERVICES NOT RUNNING' { - Get-CimInstance Win32_Service | - Where-Object { - $_.StartMode -eq 'Auto' -and $_.State -ne 'Running' - } | - Select-Object Name, DisplayName, State, StartMode | - Format-Table -AutoSize - } - - Write-Section $writer 'DEVICES WITH PROBLEMS' { - $devices = @(Get-ProblemDevices) - - if ($devices.Count -eq 0) { - '(no problem devices found)' - } - else { - $devices | - Select-Object Status, Class, FriendlyName, InstanceId, - Name, PNPClass, ConfigManagerErrorCode, DeviceID | - Format-Table -Wrap -AutoSize - } - } - - Write-Section $writer 'FIREWALL PROFILES' { - if (Get-Command Get-NetFirewallProfile -ErrorAction SilentlyContinue) { - Get-NetFirewallProfile -ErrorAction SilentlyContinue | - Select-Object Name, Enabled, DefaultInboundAction, - DefaultOutboundAction | - Format-Table -AutoSize - } - else { - 'Get-NetFirewallProfile is unavailable.' - } - } - - Write-Section $writer 'NETWORK ADAPTERS' { - if (Get-Command Get-NetAdapter -ErrorAction SilentlyContinue) { - Get-NetAdapter -ErrorAction SilentlyContinue | - Select-Object Name, InterfaceDescription, Status, - LinkSpeed, MacAddress | - Format-Table -AutoSize - } - } - - Write-Section $writer 'IP CONFIGURATION' { - ipconfig /all - } - - Write-Section $writer 'DNS SERVERS' { - if (Get-Command Get-DnsClientServerAddress -ErrorAction SilentlyContinue) { - Get-DnsClientServerAddress -ErrorAction SilentlyContinue | - Where-Object { $_.ServerAddresses.Count -gt 0 } | - Select-Object InterfaceAlias, AddressFamily, - @{Name='Servers';Expression={$_.ServerAddresses -join ', '}} | - Format-Table -AutoSize - } - } - - Write-Section $writer 'ACTIVE TCP LISTENERS' { - if (Get-Command Get-NetTCPConnection -ErrorAction SilentlyContinue) { - Get-NetTCPConnection -State Listen -ErrorAction SilentlyContinue | - Select-Object LocalAddress, LocalPort, OwningProcess | - Sort-Object LocalPort | - Format-Table -AutoSize - } - else { - netstat -ano - } - } - - Write-Section $writer 'POWER PLAN' { - powercfg /getactivescheme - } - - Write-Section $writer 'BATTERY' { - Get-CimInstance Win32_Battery -ErrorAction SilentlyContinue | - Select-Object Name, Status, EstimatedChargeRemaining, - EstimatedRunTime, BatteryStatus | - Format-List - } - - Write-Section $writer 'TOP PROCESSES BY MEMORY' { - Get-Process | - Sort-Object WorkingSet64 -Descending | - Select-Object -First 30 ProcessName, Id, - @{Name='MemoryMB';Expression={[math]::Round($_.WorkingSet64 / 1MB, 1)}}, - CPU | - Format-Table -AutoSize - } - - Write-Section $writer ('RECENT SYSTEM ERRORS - LAST ' + $EventLogDays + ' DAYS') { - $start = (Get-Date).AddDays(-$EventLogDays) - - Get-WinEvent -FilterHashtable @{ - LogName = 'System' - Level = 2 - StartTime = $start - } -ErrorAction SilentlyContinue | - Select-Object -First $MaxEventErrors TimeCreated, Id, - ProviderName, Message | - Format-List - } - - Write-Section $writer ('RECENT APPLICATION ERRORS - LAST ' + $EventLogDays + ' DAYS') { - $start = (Get-Date).AddDays(-$EventLogDays) - - Get-WinEvent -FilterHashtable @{ - LogName = 'Application' - Level = 2 - StartTime = $start - } -ErrorAction SilentlyContinue | - Select-Object -First $MaxEventErrors TimeCreated, Id, - ProviderName, Message | - Format-List - } - - Write-Section $writer 'WINDOWS COMPONENT STORE STATUS' { - if ($isAdmin) { - '[RUNNING] DISM.exe /Online /Cleanup-Image /CheckHealth' - DISM.exe /Online /Cleanup-Image /CheckHealth - } - else { - 'Skipped: DISM /CheckHealth requires an elevated session.' - } - } - - Write-Section $writer 'SYSTEM FILE CHECK - VERIFY ONLY' { - if ($isAdmin) { - '[RUNNING] sfc.exe /verifyonly' - - $tempSfc = Join-Path $env:TEMP ( - 'winreport_sfc_' + - [guid]::NewGuid().ToString('N') + - '.txt' - ) - - try { - cmd.exe /c "sfc.exe /verifyonly > `"$tempSfc`" 2>&1" - - if (Test-Path $tempSfc) { - $bytes = [System.IO.File]::ReadAllBytes($tempSfc) - - # SFC output is commonly UTF-16LE - $text = [System.Text.Encoding]::Unicode.GetString($bytes) - - $text.Trim([char]0) - } - else { - 'SFC output file was not created.' - } - } - finally { - Remove-Item $tempSfc -Force -ErrorAction SilentlyContinue - } - } - else { - 'Skipped: sfc /verifyonly requires an elevated session.' - } - } - Write-Section $writer 'IMPORTANT DIRECTORIES' { - $programFilesX86 = [Environment]::GetEnvironmentVariable('ProgramFiles(x86)') - - New-Object PSObject -Property @{ - WindowsDirectory = $env:WINDIR - SystemDrive = $env:SystemDrive - ProgramFiles = $env:ProgramFiles - ProgramFilesX86 = $programFilesX86 - ProgramData = $env:ProgramData - UserProfile = $env:USERPROFILE - Temp = $env:TEMP - } | Format-List - } - } - - Write-Both $writer '' - Write-Both $writer ('Completed: ' + (Get-Date -Format 'yyyy-MM-dd HH:mm:ss K')) - Write-Both $writer ('Saved to: ' + $reportPath) -} -finally { - if ($writer) { - $writer.Dispose() - } -} +id: "BEF-2026-09-14-CLEVO-002" + +organization: "Beffroi" + +title: "System Stability Investigation — Storage / Firmware Follow-up" +subtitle: "PC Specialist / Clevo — exhaustive diagnostic record and current assessment" + +report_type: technical +theme: default + +status: "open" +severity: "high" + +metadata: + Date: "2026-09-14" + Device: "DESKTOP-SAU019H" + Model: "PC Specialist / Clevo NH5x_NH7x_HHx_HJx_HKx" + Motherboard: "CLEVO NHxxHJHK" + BIOS: "Insyde 1.07.07TPCS1 — 2021-09-16" + CPU: "Intel Core i7-11800H" + Memory: "16 GB" + GPU: "Intel UHD Graphics + NVIDIA GeForce GTX 1650" + OS: "Windows 11 Pro — image version 10.0.26200.9168" + SATAStorage: "128GB PCS 2.5-inch SSD — serial U9DI16295T" + NVMeStorage: "1TB PCS PCIe M.2 SSD — Silicon Motion NVMe controller PCI VEN_126F DEV_2263" + Author: "Maximilien Rigaut" + Purpose: "Continuation and consolidation of the 2026-09-04 Clevo stability investigation" + +summary: > + The investigation of DESKTOP-SAU019H was resumed on 2026-09-14 after earlier + hard freezes, shutdown anomalies, an NVRAM-reset firmware warning, TPM / + Measured Boot errors and repeated NVMe controller errors. Fast Startup was + disabled by disabling hibernation. DISM successfully repaired the Windows + component store and SFC found and repaired protected system-file corruption; + a subsequent SFC scan after restart reported no remaining integrity + violations. Storage enumeration before restart exposed only the 128 GB SATA + SSD through Get-Disk and Get-PhysicalDisk, while the 1 TB NVMe remained known + to Plug and Play. After restart, Windows positively enumerated the 1 TB PCS + PCIe M.2 SSD and its Standard NVM Express Controller as present and working + properly, with the controller linked at PCIe Gen3 x4, but Get-Disk still + exposed only the 128 GB SATA SSD. A new stornvme Event 11 occurred at + 16:23:21 on 2026-09-14, reporting a controller error on \Device\RaidPort2. + Historical Event 129 resets and Event 11 controller errors against the same + RaidPort2 are present on 2026-09-04 and repeatedly as far back as March 2026. + The BIOS menus inspected during this session did not list the 1 TB NVMe/SATA + device. The strongest current lead is therefore an intermittent or partial + failure somewhere in the 1 TB NVMe storage path: the SSD itself, its M.2 + connection, PCIe link / slot, controller behaviour, firmware interaction or + power delivery. A failing SSD is not yet conclusively proven. The NVRAM / + CMOS issue remains a separate open diagnostic track. + +timeline: + - time: "2026-09-04 ~15:21" + event: "NVMe controller error" + notes: > + stornvme Event 11 reported a controller error on \Device\RaidPort2. + + - time: "2026-09-04 ~16:30" + event: "Firmware / NVRAM warning" + notes: > + Firmware displayed a first-boot or NVRAM-reset-condition warning. + + - time: "2026-09-04 ~16:32" + event: "TPM / Measured Boot failure" + notes: > + TPM-WMI Event 1040 reported a critical pre-attestation health-check + failure and referenced a MeasuredBoot diagnostic JSON file. + + - time: "2026-09-04 ~16:44" + event: "Second confirmed NVMe controller error" + notes: > + stornvme Event 11 again reported a controller error on + \Device\RaidPort2. + + - time: "2026-09-04 ~16:53" + event: "Normal shutdown failure" + notes: > + Windows shutdown hung and a forced power-off was required. + + - time: "2026-09-04 later" + event: "Restart test" + notes: > + A normal Windows restart completed successfully. + + - time: "2026-09-04 later" + event: "Full-shutdown test bypassing Fast Startup" + notes: > + A full shutdown completed normally when Fast Startup was bypassed. + + - time: "2026-09-04 <17:23" + event: "Hard freeze" + notes: > + A system freeze occurred before further configuration changes. + + - time: "2026-09-04 ~17:25" + event: "Second hard freeze" + notes: > + A second freeze / hang was observed. + + - time: "2026-09-14 before storage retest" + event: "Fast Startup disabled" + notes: > + powercfg /h off completed without error. Hibernation was disabled, + which also disables Windows Fast Startup. + + - time: "2026-09-14 before storage retest" + event: "DISM CheckHealth syntax attempt" + notes: > + DISM /CheckHealth returned Error 87 because /Online /Cleanup-Image + were omitted. This was a command syntax issue and not a diagnostic + failure. + + - time: "2026-09-14 before storage retest" + event: "DISM component-store repair" + notes: > + DISM /Online /Cleanup-Image /RestoreHealth completed at 100 percent. + DISM reported that the restore operation and overall operation + completed successfully. + + - time: "2026-09-14 before storage retest" + event: "SFC system-file repair" + notes: > + sfc /scannow found corrupt files and successfully repaired them. + + - time: "2026-09-14 before restart" + event: "Initial disk inventory" + notes: > + Get-Disk exposed only Disk 0, the 128GB PCS 2.5-inch SATA SSD, + Online and Healthy. The 1 TB NVMe was absent from Get-Disk. + + - time: "2026-09-14 before restart" + event: "Initial physical-disk inventory" + notes: > + Get-PhysicalDisk exposed only the 128GB PCS 2.5-inch SATA SSD, + Healthy / OK. The 1 TB NVMe was absent from this storage-provider view. + + - time: "2026-09-14 before restart" + event: "PnP controller inventory" + notes: > + A Standard NVM Express Controller with hardware ID PCI\VEN_126F&DEV_2263 + existed in Plug and Play history but was initially shown with status + Unknown in the non-PresentOnly query. + + - time: "2026-09-14 before restart" + event: "PnP disk inventory" + notes: > + A 1TB PCS PCIe M.2 SSD device entry existed in Plug and Play history + but was initially shown with status Unknown in the non-PresentOnly + query. Numerous historical USB storage entries were also present, + demonstrating that this query included devices not currently attached. + + - time: "2026-09-14 before restart" + event: "SATA reliability telemetry" + notes: > + Get-StorageReliabilityCounter returned data for DeviceId 0, the visible + 128 GB SATA SSD: 2033 power-on hours, 40 C temperature, wear 0, + ReadErrorsTotal 0, ReadErrorsUncorrected 0, maximum read latency + 4253 ms and maximum write latency 6122 ms. This telemetry did not + describe the 1 TB NVMe. + + - time: "2026-09-14 restart / BIOS inspection" + event: "BIOS storage inspection" + notes: > + The BIOS menus inspected by the operator did not show a 1 TB NVMe or + SATA storage device. This observation is retained as evidence, but the + exact Clevo/Insyde BIOS menu capabilities have not been established; + absence from a BIOS menu does not by itself prove failure to enumerate + the PCIe function. + + - time: "2026-09-14 16:15:38" + event: "NVMe controller arrival after reboot" + notes: > + Windows recorded the Standard NVM Express Controller LastArrivalDate + as 2026-09-14 16:15:38. + + - time: "2026-09-14 ~16:15 onward" + event: "PresentOnly controller enumeration" + notes: > + Get-PnpDevice -PresentOnly positively enumerated the Standard NVM + Express Controller as present with Status OK. + + - time: "2026-09-14 ~16:15 onward" + event: "PresentOnly 1 TB NVMe disk enumeration" + notes: > + Get-PnpDevice -PresentOnly -Class DiskDrive positively enumerated + 1TB PCS PCIe M.2 SSD with Status OK alongside the 128 GB SATA SSD. + + - time: "2026-09-14 ~16:15 onward" + event: "Get-Disk still omitted NVMe" + notes: > + Despite positive current PnP enumeration of the NVMe controller and + disk device, Get-Disk still exposed only the 128 GB SATA SSD. + + - time: "2026-09-14 ~16:15 onward" + event: "NVMe controller state inspected" + notes: > + The controller reported CM_PROB_NONE, ConfigManagerErrorCode + CM_PROB_NONE, Status OK, Present True, HasProblem False and service + stornvme. + + - time: "2026-09-14 ~16:15 onward" + event: "NVMe PCIe link inspected" + notes: > + Device properties reported PCI bus 2, device 0, function 0, + CurrentLinkSpeed 3, CurrentLinkWidth 4, MaxLinkSpeed 3 and + MaxLinkWidth 4. The controller was therefore actively enumerated on a + PCIe Gen3 x4 link at the time of inspection. + + - time: "2026-09-14 16:23:21" + event: "New NVMe controller error" + notes: > + stornvme Event 11 reported: "The driver detected a controller error on + \Device\RaidPort2." This event occurred during the current diagnostic + session after the NVMe controller had arrived and been enumerated. + + - time: "2026-09-14 after 16:23" + event: "Historical stornvme event review" + notes: > + Event-log review confirmed repeated Event 129 device resets and + Event 11 controller errors on \Device\RaidPort2 on 2026-09-04 and + repeatedly in June and March 2026. The pattern therefore predates the + September incident. + + - time: "2026-09-14 after event review" + event: "Post-repair SFC verification" + notes: > + A second sfc /scannow completed with "Windows Resource Protection did + not find any integrity violations." + +findings: + - title: "Fast Startup disabled for diagnosis" + severity: "info" + status: "completed" + evidence: > + powercfg /h off completed successfully. + assessment: > + Disabling hibernation disables Windows Fast Startup and removes the + previously observed Fast Startup path from subsequent shutdown and boot + tests. This is an appropriate diagnostic control and should remain in + place until the investigation is complete. + + - title: "Windows component-store corruption" + severity: "medium" + status: "repaired" + evidence: > + DISM /Online /Cleanup-Image /RestoreHealth completed successfully. + assessment: > + A Windows integrity problem existed and was repaired. The evidence does + not establish whether corruption contributed to the hard freezes, + resulted from forced power-offs, or was unrelated. + + - title: "Protected Windows system-file corruption" + severity: "medium" + status: "repaired" + evidence: > + The first sfc /scannow found corrupt files and repaired them. A later + sfc /scannow after restart reported no integrity violations. + assessment: > + Windows protected-file integrity is currently clean. Recurrent immediate + corruption was not observed after repair and reboot. + + - title: "1 TB NVMe absent from Get-Disk / Get-PhysicalDisk" + severity: "high" + status: "confirmed" + evidence: > + Before restart, both Get-Disk and Get-PhysicalDisk exposed only the + 128 GB PCS SATA SSD. After restart, Get-Disk still exposed only the + SATA SSD even though PresentOnly PnP enumeration showed the NVMe + controller and 1 TB NVMe disk as currently present. + assessment: > + Windows can enumerate the PCIe NVMe function and child disk device but + does not currently expose the 1 TB NVMe as a normal usable disk through + the storage-management layer. This strongly supports a problem in the + NVMe storage path rather than a simple stale Device Manager entry. + + - title: "1 TB NVMe positively present on PCIe after reboot" + severity: "high" + status: "confirmed" + evidence: > + Get-PnpDevice -PresentOnly reported the Standard NVM Express Controller + and 1TB PCS PCIe M.2 SSD as present with Status OK. The controller + reported Present True, HasProblem False, CM_PROB_NONE and a PCIe Gen3 + x4 link. + assessment: > + The controller was physically enumerated at the PCIe level during the + session. Therefore the device was not simply absent from the PCIe bus at + the moment these properties were queried. This does not demonstrate + reliable access to the NVMe media. + + - title: "Current-session stornvme controller error" + severity: "high" + status: "confirmed" + evidence: > + stornvme Event 11 occurred at 2026-09-14 16:23:21 and reported a + controller error on \Device\RaidPort2. + assessment: > + This is direct evidence of an active storage-controller/path failure + during the current session. It materially raises the priority of the + 1 TB NVMe path as a potential explanation for the historical freezes. + + - title: "Long-running RaidPort2 reset / error pattern" + severity: "high" + status: "confirmed" + evidence: > + Historical logs contain repeated stornvme Event 129 resets and Event 11 + controller errors on \Device\RaidPort2 on 2026-09-04 and repeatedly in + June and March 2026. + assessment: > + The storage-path problem is recurrent and predates the September 2026 + hard-freeze investigation. This makes a one-off Windows corruption event + an insufficient explanation for the controller-error history. + + - title: "NVMe physical failure not yet proven" + severity: "high" + status: "open" + evidence: > + The NVMe controller and child disk can currently enumerate on PCIe and + report PnP Status OK, while stornvme simultaneously records controller + errors and the disk remains absent from Get-Disk. + assessment: > + The evidence is compatible with a failing NVMe SSD, but does not yet + distinguish the SSD itself from the M.2 connection, motherboard slot / + PCIe path, controller firmware, system firmware interaction or power + delivery. The drive should not yet be condemned solely from Event 11. + + - title: "BIOS does not list 1 TB storage device in inspected menus" + severity: "medium" + status: "observed" + evidence: > + During the 2026-09-14 BIOS inspection, no 1 TB NVMe/SATA device was + visible to the operator. + assessment: > + Retain this as an important observation. However, the available evidence + does not establish whether this specific Insyde BIOS exposes NVMe device + inventory in its UI. Windows later demonstrated active PCIe enumeration, + so absence from the visible BIOS menus must not be treated as conclusive + proof that firmware failed to enumerate the controller. + + - title: "NVRAM / CMOS retention issue" + severity: "high" + status: "open" + evidence: > + The original firmware warning reported a first-boot or NVRAM-reset + condition. + assessment: > + The warning remains unexplained. A failed RTC/CMOS battery is possible + but not proven. A controlled unpowered retention test of BIOS time and + settings remains required. This issue should remain diagnostically + separate from the NVMe fault unless further evidence connects them. + + - title: "TPM / Measured Boot pre-attestation failure" + severity: "medium" + status: "open" + evidence: > + TPM-WMI Event 1040 previously reported a critical pre-attestation + health-check failure and referenced a MeasuredBoot JSON diagnostic file. + assessment: > + The temporal association with the NVRAM warning makes a firmware-state + relationship plausible, but no causal relationship has been proven. + The TPM should not be cleared merely as a diagnostic experiment. + + - title: "128 GB SATA SSD telemetry" + severity: "info" + status: "currently-normal" + evidence: > + The visible SATA SSD reported Healthy / OK, 40 C, wear 0, + ReadErrorsTotal 0 and ReadErrorsUncorrected 0 in the supplied reliability + counter output. + assessment: > + No direct read-error evidence was observed for the 128 GB SATA SSD in + this checkpoint. The unusually high recorded maximum latency values are + retained for completeness but are not by themselves sufficient to + diagnose failure. + +sections: + - title: "Commands and results — boot / shutdown control" + content: + - type: bullets + items: + - > + powercfg /h off — completed without error; hibernation and Fast + Startup disabled. + - > + Previous full-shutdown test bypassing Fast Startup — completed + normally. + - > + Previous normal restart test — completed normally. + + - title: "Commands and results — Windows integrity" + content: + - type: bullets + items: + - > + DISM /CheckHealth — returned Error 87 because the required + /Online /Cleanup-Image arguments were omitted. This result has no + diagnostic significance for Windows health. + - > + DISM /Online /Cleanup-Image /RestoreHealth — reached 100 percent + and completed successfully. + - > + First sfc /scannow — found corrupt files and successfully + repaired them. + - > + Second sfc /scannow after restart — no integrity violations found. + + - title: "Commands and results — initial storage inventory" + content: + - type: bullets + items: + - > + Get-Disk — only Disk 0, 128GB PCS 2.5-inch SSD, SATA, Online, + Healthy, 128035676160 bytes. + - > + Get-PhysicalDisk — only 128GB PCS 2.5-inch SSD, SSD/SATA, + Healthy / OK, 128035676160 bytes. + - > + Get-PnpDevice -Class SCSIAdapter — historical list included a + Standard NVM Express Controller with PCI VEN_126F DEV_2263, + initially shown as Unknown without -PresentOnly. + - > + Get-PnpDevice -Class DiskDrive — historical list included + 1TB PCS PCIe M.2 SSD, initially shown as Unknown without + -PresentOnly, along with many disconnected historical USB devices. + - > + Get-StorageReliabilityCounter — returned telemetry only for the + visible DeviceId 0 / 128 GB SATA SSD: 2033 power-on hours, 40 C, + wear 0, no reported read errors. + + - title: "Commands and results — post-reboot NVMe enumeration" + content: + - type: bullets + items: + - > + Get-PnpDevice -PresentOnly -Class SCSIAdapter — Standard NVM + Express Controller present, Status OK. + - > + Get-PnpDevice -PresentOnly -Class DiskDrive — 1TB PCS PCIe M.2 SSD + present, Status OK; 128GB PCS 2.5-inch SSD also present. + - > + Get-Disk — still exposed only the 128 GB SATA SSD. + - > + PresentOnly PCI VEN_126F DEV_2263 query — controller Status OK, + class SCSIAdapter. + - > + Controller detailed properties — CM_PROB_NONE, + ConfigManagerErrorCode CM_PROB_NONE, Present True, + HasProblem False, Service stornvme. + - > + Controller PCI properties — bus 2, device 0, function 0; + current and maximum link speed 3; current and maximum link width 4; + AER capability present. + - > + Controller LastArrivalDate — 2026-09-14 16:15:38. + - > + Controller bus relation and child relationship both reference + SCSI\Disk&Ven_NVMe&Prod_1TB_PCS_PCIe_M.2. + + - title: "Commands and results — storage event history" + content: + - type: bullets + items: + - > + 2026-09-14 16:23:21 — stornvme Event 11: + controller error on \Device\RaidPort2. + - > + 2026-09-04 17:22:40 — stornvme Event 11: + controller error on \Device\RaidPort2. + - > + 2026-09-04 17:20:46 — stornvme Event 129: + reset to \Device\RaidPort2 issued. + - > + 2026-09-04 17:12:39 — stornvme Event 129: + reset to \Device\RaidPort2 issued. + - > + 2026-09-04 16:57:14 — stornvme Event 11: + controller error on \Device\RaidPort2. + - > + 2026-09-04 16:55:20 — stornvme Event 129: + reset to \Device\RaidPort2 issued. + - > + 2026-09-04 16:44:57 — stornvme Event 11: + controller error on \Device\RaidPort2. + - > + 2026-09-04 16:43:03 — stornvme Event 129: + reset to \Device\RaidPort2 issued. + - > + 2026-09-04 15:21:28 — stornvme Event 11: + controller error on \Device\RaidPort2. + - > + 2026-09-04 15:19:32 — stornvme Event 129: + reset to \Device\RaidPort2 issued. + - > + Additional Event 11 / Event 129 occurrences were confirmed on + 2026-06-09, 2026-06-08, 2026-03-26, 2026-03-21, 2026-03-20, + 2026-03-19 and 2026-03-18. + + - title: "BIOS / firmware observations" + content: + - type: bullets + items: + - > + Earlier investigation observed: "A first boot or NVRAM reset + condition has been detected." + - > + BIOS used during this investigation: Insyde 1.07.07TPCS1. + - > + Operator inspection on 2026-09-14 found no visible 1 TB NVMe/SATA + device in the BIOS menus examined. + - > + No BIOS update or firmware flash has been performed during this + diagnostic sequence. + - > + No TPM clear has been performed. + + - title: "Interpretation at this checkpoint" + content: + - type: callout + title: "Current state" + kind: "warning" + text: > + Windows software integrity has been repaired and verified clean, but + the storage problem remains active. The 1 TB NVMe controller and + child disk can enumerate on PCIe while the disk remains absent from + Get-Disk, and a new Event 11 controller error was generated during + the current session. This substantially strengthens the NVMe / + M.2 / PCIe storage-path hypothesis for the hard-freeze investigation. + It still does not identify which physical component in that path is + defective. + + - type: bullets + items: + - "Fast Startup is disabled and should remain disabled during diagnosis." + - "Windows component-store corruption has been repaired." + - "Windows protected system files are currently clean." + - "The 128 GB SATA SSD is the only disk exposed by Get-Disk." + - "The 1 TB NVMe controller is currently enumerated on PCIe Gen3 x4." + - "The 1 TB NVMe child disk is currently visible to PresentOnly PnP." + - "The 1 TB NVMe is nevertheless absent from Get-Disk." + - "A new stornvme Event 11 occurred during this diagnostic session." + - "RaidPort2 Event 11 / 129 faults recur over several months." + - "The 1 TB SSD itself is a primary suspect but is not yet conclusively proven defective." + - "M.2 seating, slot / motherboard path and power delivery remain plausible alternatives." + - "The NVRAM / CMOS issue remains open and should not yet be merged with the NVMe diagnosis." + - "TPM / Measured Boot evidence remains preserved and unresolved." + - "A BIOS flash is not currently justified as a first remediation step." + +actions_title: "Recommended next diagnostic steps" + +actions: + - title: "Back up important data" + status: "priority" + text: > + Ensure all important data is backed up before further manipulation or + testing. Recurrent NVMe controller resets/errors justify treating the + storage path as potentially unreliable. + + - title: "Perform controlled full shutdown" + status: "pending" + text: > + With Fast Startup already disabled, perform a full shutdown before any + physical inspection. + commands: + - "shutdown /s /t 0" + + - title: "Physically inspect and reseat the 1 TB M.2 NVMe" + status: "pending" + text: > + Disconnect AC power and, where service procedure permits, disconnect + the internal battery before handling the M.2 drive. Photograph the SSD + label and exact part number. Inspect the retaining screw, seating, + contacts and socket; remove and firmly reseat the SSD. Do not change + unrelated firmware settings during the same test. + + - title: "Retest storage enumeration after reseat" + status: "pending" + text: > + After reseating, boot the machine and determine whether the 1 TB NVMe + becomes a normal disk and whether new stornvme errors appear. + commands: + - "Get-Disk" + - "Get-PhysicalDisk" + - "Get-PnpDevice -PresentOnly -Class SCSIAdapter" + - "Get-PnpDevice -PresentOnly -Class DiskDrive" + + - title: "Review post-reseat stornvme events" + status: "pending" + text: > + Check the System log for fresh Event 11 or Event 129 entries immediately + after the test boot. + commands: + - "Get-WinEvent -FilterHashtable @{ LogName='System'; ProviderName='stornvme'; StartTime=(Get-Date).AddMinutes(-30) } | Format-List TimeCreated, Id, LevelDisplayName, Message" + + - title: "Isolate SSD versus motherboard path if errors persist" + status: "pending" + text: > + If the NVMe remains absent from Get-Disk or Event 11 / 129 recurs after + reseating, test the SSD in another known-good compatible M.2 slot, + external NVMe enclosure or another system where practical. Conversely, + test a known-good compatible NVMe in the Clevo slot if available. The + purpose is to distinguish drive failure from slot / motherboard / power + failure before replacing parts. + + - title: "Perform NVRAM / CMOS retention test" + status: "pending" + text: > + Record BIOS date/time and relevant settings, fully power down, disconnect + AC for an extended interval, then boot directly into BIOS and verify + retention. If settings or time are lost, investigate the RTC/CMOS battery, + its connection and the motherboard RTC power path. + + - title: "Preserve TPM / Measured Boot evidence" + status: "pending" + text: > + Keep the referenced MeasuredBoot JSON before any TPM, Secure Boot or + firmware reset operation. Do not clear the TPM solely as a diagnostic + experiment. + commands: + - 'C:\WINDOWS\Logs\MeasuredBoot\0000000053-0000000000.json' + + - title: "Defer BIOS flashing" + status: "hold" + text: > + Do not flash BIOS/EC firmware while the machine has an unresolved + intermittent storage fault unless a later, model-specific remediation + path explicitly requires it and power/storage stability has first been + established. + +closing: > + At this checkpoint the Windows repair is complete and verified, while the + storage-path fault remains active and repeatable. The strongest evidence is + the coexistence of a currently enumerated PCIe Gen3 x4 NVMe controller, + failure of the 1 TB NVMe to appear in Get-Disk, and a fresh stornvme Event 11 + on \Device\RaidPort2 during the 2026-09-14 session, backed by months of + historical Event 11 and Event 129 activity. The immediate priority is + preservation of data followed by physical M.2 inspection/reseat and controlled + device-versus-slot isolation. The firmware NVRAM/CMOS and TPM/Measured Boot + findings remain unresolved parallel tracks and should not yet be assumed to + share the same root cause. \ No newline at end of file