Disable Windows Error Reporting - dcasota/Lenovo83BY GitHub Wiki
In Eventviewer I noticed quite a few entries about Windows error reporting.
The weblink https://woshub.com/wer-windows-error-reporting-clear-reportqueue-folder-windows/ provides quite good information about what the service does, where it stores the data and how the service can be disabled and the data deleted.
Stop the service.
Get-Service WerSvc| stop-service –passthru -force
Status Name DisplayName
------ ---- -----------
Stopped WerSvc Windows Error Reporting Service
Set to manual
Set-Service WerSvc –startuptype manual –passthru
Status Name DisplayName
------ ---- -----------
Stopped WerSvc Windows Error Reporting Service
Disable Windows Error Reporting for everyone
Disable-WindowsErrorReporting
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d "1" /f
Delete local appdata.
$users = Get-ChildItem c:\users|where{$_.name -notmatch 'Public|default'}
foreach ($user in $users){
>> Get-ChildItem "C:\Users\$User\AppData\Local\Microsoft\Windows\WER\ " –Recurse -ErrorAction SilentlyContinue | Remove-Item –force –Recurse
>> }
Delete all data (day 0, -1, -2, ...).
Get-ChildItem -Path 'C:\ProgramData\Microsoft\Windows\WER\ReportArchive' -Recurse | Where-Object CreationTime -lt (Get-Date).AddDays(0) | Remove-Item -Force -Recurse
PS C:\Windows\System32> Get-ChildItem -Path 'C:\ProgramData\Microsoft\Windows\WER\ReportQueue' -Recurse | Where-Object CreationTime -lt (Get-Date).AddDays(0) | Remove-Item -Force –Recurse