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.

Disclaimer:

The sample scripts provided below are adapted from third-party open-source sites.

Check Windows Error Reporting status

To check the current status of error reporting on your Windows device, execute the following PowerShell command:

  • 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.

    When the command to check Windows Error Reporting status is executed, the output can be seen in the Action History

PowerShell script

Before running the following commands, you can check the current status of Windows Error Reporting using:

To enable Windows Error Reporting:

To disable Windows Error Reporting:

If the PowerShell command executes successfully, the output in the Action History of the device will show “True”.

When the PowerShell command to enable Windows Error Reporting is executed, the output can be seen in the Action History

Batch Script

To enable Windows Error Reporting:

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:

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”.

When the Batch command to enable Windows Error Reporting is executed, the output can be seen in the Action History

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository