# 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](https://www.hexnode.com/mobile-device-management/help/executing-custom-scripts-for-windows/) 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:

Script to check Windows Error Reporting status

Get-WindowsErrorReporting 

   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**. [![When the command to check Windows Error Reporting status is executed, the output can be seen in the Action History](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2025/06/Output-if-Windows-Error-Reporting-is-enabled.png "Output if Windows Error Reporting is enabled")](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2025/06/Output-if-Windows-Error-Reporting-is-enabled.png)

PowerShell script 
------------------

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

Script to check Windows Error Reporting status

Get-WindowsErrorReporting 

   1

  Get-WindowsErrorReporting 

   

 

  

**To enable Windows Error Reporting:**

PowerShell script to enable Windows Error Reporting

Enable-WindowsErrorReporting 

   1

  Enable-WindowsErrorReporting 

   

 

  

**To disable Windows Error Reporting:**

PowerShell script to disable Windows Error Reporting

Disable-WindowsErrorReporting 

   1

  Disable-WindowsErrorReporting 

   

 

  

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](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2025/06/Output-for-the-PowerShell-command-to-enable-Windows-Error-Reporting.png "Output for the PowerShell command to enable Windows Error Reporting")](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2025/06/Output-for-the-PowerShell-command-to-enable-Windows-Error-Reporting.png)

Batch Script
------------

**To enable Windows Error Reporting:**

Batch script to enable Windows Error Reporting

reg add "HKLM\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting" /v Disabled /t REG\_DWORD /d 0 /f 

   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:**

Batch script to disable Windows Error Reporting

reg add "HKLM\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting" /v Disabled /t REG\_DWORD /d 1 /f 

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

[![When the Batch command to enable Windows Error Reporting is executed, the output can be seen in the Action History](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2025/06/Output-for-the-Batch-command-to-enable-Windows-Error-Reporting.png "Output for the Batch command to enable Windows Error Reporting")](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2025/06/Output-for-the-Batch-command-to-enable-Windows-Error-Reporting.png)

 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.