Enable Crash Dumps
Jump to navigation
Jump to search
You can set Windows to generate a memory dump file should a process crash. This makes debugging much easier.
Description
A memory crash dump is a file that contains the memory of a process that was running. The steps to configure Windows to generate these files is a process unexpectedly exist are described here and here.
Sample Script
The following PowerShell script will configure a machine to write a maximum of 500 crash dumps to a folder named "C:\ClusterStorage\Scratch\U05\CrashDumps"
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "LocalDumps"
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpFolder" -Value "C:\ClusterStorage\Scratch\U05\CrashDumps" -PropertyType "ExpandString"
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpCount" -Value 500 -PropertyType DWord
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpType" -Value 1 -PropertyType DWord