Category filter
Enable/disable Windows Error Reporting with PowerShell scripts
Windows Error Reporting (WER) is a feature in Windows that allows the operating system to collect and send error information to Microsoft when a program crashes or encounters problems. Enabling WER on the device can help send error reports to Microsoft to diagnose issues and improve software reliability. Here’s a script to enable Windows Error Reporting on devices. With Hexnode’s Execute Custom Script remote action, you can deploy the script remotely.
PowerShell script
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$werKey = "HKLM:\SOFTWARE\Microsoft\Windows Error Reporting" if (-not (Test-Path $werKey)) { New-Item -Path $werKey -Force } Set-ItemProperty -Path $werKey -Name "Disabled" -Value 0 Set-ItemProperty -Path $werKey -Name "AutoSubmit" -Value 1 Write-Host "Windows Error Reporting has been enabled with automatic submission." |
This script checks if Windows Error Reporting is enabled and if not, ensures that error reporting is turned on and set to automatically submit error reports to Microsoft. You can follow the steps to access the output.
- Login to your Hexnode UEM portal.
- Navigate to the Manage tab.
- Select the device for which error reporting is executed.
- Go to Action History.
- You can find the option Output corresponding to the policy applied.