Last active
October 4, 2017 19:34
-
-
Save hpaul-osi/2568f57a1179e6a3b07bdd86bc669027 to your computer and use it in GitHub Desktop.
Enable WER
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration EnableWER | |
{ | |
param( | |
[System.String] | |
$NodeName = 'localhost', | |
[System.String] | |
$DumpFolder = '' | |
) | |
Import-DSCResource -ModuleName 'PSDesiredStateConfiguration' | |
Node $NodeName | |
{ | |
if('' -eq $DumpFolder -or $null -eq $DumpFolder) | |
{ $DumpFolder = "$Env:USERPROFILE\DumpFiles" } | |
$WERRegistryKey = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' | |
Registry "$WERRegistryKey\DumpFolder" | |
{ | |
Ensure = 'Present' | |
Key = $WERRegistryKey | |
ValueData = $DumpFolder | |
ValueName = 'DumpFolder' | |
ValueType = 'ExpandString' | |
} | |
Registry "$WERRegistryKey\DumpCount" | |
{ | |
Ensure = 'Present' | |
Key = $WERRegistryKey | |
ValueName = 'DumpCount' | |
ValueData = 2 | |
ValueType = 'DWORD' | |
} | |
Registry "$WERRegistryKey\DumpType" | |
{ | |
Ensure = 'Present' | |
Key = $WERRegistryKey | |
ValueName = 'DumpType' | |
ValueData = 2 | |
ValueType = 'DWORD' | |
} | |
Registry "$WERRegistryKey\DontShowUI" | |
{ | |
Ensure = 'Present' | |
Key = $WERRegistryKey | |
ValueName = 'DontShowUI' | |
ValueData = 1 | |
ValueType = 'DWORD' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment