Category filter
Enable/disable Windows Error Reporting with PowerShell scripts
Windows Error Reporting (WER) is a feature in Windows that collects and sends error information to Microsoft when a program crashes or encounters issues. Enabling WER helps Microsoft diagnose problems and improve software reliability. You can use the PowerShell or Batch scripts provided below to enable or disable Windows Error Reporting on Windows devices and deploy them remotely using Hexnode’s Execute Custom Script remote action.
Check Windows Error Reporting status
To check the current status of error reporting on your Windows device, execute the following PowerShell command:
1 |
Get-WindowsErrorReporting |
- If Windows Error Reporting is disabled, the output will display “Disabled” in the Action History.
- If Windows Error Reporting is enabled, the output will display “Enabled” in the Action History.
PowerShell script
Before running the following commands, you can check the current status of Windows Error Reporting using:
1 |
Get-WindowsErrorReporting |
To enable Windows Error Reporting:
1 |
Enable-WindowsErrorReporting |
To disable Windows Error Reporting:
1 |
Disable-WindowsErrorReporting |
If the PowerShell command executes successfully, the output in the Action History of the device will show “True”.
Batch Script
To enable Windows Error Reporting:
1 |
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v Disabled /t REG_DWORD /d 0 /f |
This Batch command enables Windows Error Reporting by adding or modifying the Disabled registry value under HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting. It sets the value to 0, allowing Windows to collect and send crash reports to Microsoft’s servers for analysis and troubleshooting.
To disable Windows Error Reporting:
1 |
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v Disabled /t REG_DWORD /d 1 /f |
This Batch command disables Windows Error Reporting by adding or modifying the Disabled registry value under HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting. It sets the value to 1, preventing Windows from collecting and sending crash reports to Microsoft’s servers for analysis and troubleshooting.
If the Batch command is successful, the Action History of the device will show “The operation completed successfully”.