Monitoring BSOD Crashes the Easy Way in Windows 10

3

Being on Windows, the Blue Screen of Death (BSOD) seems inevitable, though it becomes less and less with the improvements on Windows 10 over the recent years. If it happens more often than you can tolerate, it’s time to dig it down to find the bottom of it.

We’ve introduced a way to deal with it, which uses a command-line utility called dumpchk to exam the memory dump file generated by the BSOD mechanism Windows 10 has in place.

NirSoft has a freeware portable tool called BlueScreenView that makes the process a lot simpler. It scans all the minidump files created during the BSOD crashes and displays the information about all these crashes in one single table. For each crash displayed in the upper pane, you can easily view the details in the lower pane.

image 600x344 - Monitoring BSOD Crashes the Easy Way in Windows 10

It’s interesting that you can even see the classic blue screen style by going to Options > Lower Pane Mode > Blue Screen in XP style.

image 1 600x344 - Monitoring BSOD Crashes the Easy Way in Windows 10

The tool is also able to pull and exam the minidumps from other computers on the same network too. Simply go to the Advanced Options, type the minidump folder of the remote computer, and press OK.

image 2 - Monitoring BSOD Crashes the Easy Way in Windows 10

What makes all NirSoft tools unique is that they can also be launched as a command-line as well with a bunch of switch options. It is no different for BlueScreenView.

For example, to run the tool and export the results in a CSV file.

BlueScreenView.exe /scomma "path\output.csv"

What’s cool about it is that now you can wrap it in a PowerShell script to automate the process that monitors not only your computer but other computers on the same network’s BSOD crashes.

The following script, thanks to CyberDrain, load up the BlueScreenView tool and check the output file to display any crash details if any happened.

try {
    Invoke-WebRequest -Uri "https://www.nirsoft.net/utils/bluescreenview.zip" -OutFile "$($ENV:Temp)\bluescreeview.zip"
    Expand-Archive "$($ENV:Temp)\bluescreeview.zip" -DestinationPath "$($ENV:Temp)" -Force
    Start-Process -FilePath "$($ENV:Temp)\Bluescreenview.exe" -ArgumentList "/scomma `"$($ENV:Temp)\Export.csv`"" -Wait
 
}
catch {
    Write-Host "BSODView Command has Failed: $($_.Exception.Message)"
    exit 1
}
 
$BSODs = get-content "$($ENV:Temp)\Export.csv" | ConvertFrom-Csv -Delimiter ',' -Header Dumpfile, Timestamp, Reason, Errorcode, Parameter1, Parameter2, Parameter3, Parameter4, CausedByDriver | foreach-object { $_.Timestamp = [datetime]::Parse($_.timestamp, [System.Globalization.CultureInfo]::CurrentCulture); $_ }
Remove-item "$($ENV:Temp)\Export.csv" -Force
 
$BSODFilter = $BSODs | where-object { $_.Timestamp -gt ((get-date).addhours(-24)) }
 
if (!$BSODFilter) {
    write-host "Healthy - No BSODs found in the last 24 hours"
}
else {
    write-host "Unhealthy - BSOD found. Check Diagnostics"
    $BSODFilter
    exit 1
}
image 3 600x552 - Monitoring BSOD Crashes the Easy Way in Windows 10

3 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here