Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell 3.0 to configure Windows Error Reporting settings on Windows 8.
Microsoft Scripting Guy, Ed Wilson, is here. Well, yesterday was awesome—the Scripting Wife and I spent the day with the Dutch Windows PowerShell User group. It was an all-day user group meeting, and I made two presentations and got to listen to several other awesome sessions. It was fun, educational, and very productive.
On the train from Oslo to Norway, I spent part of the time playing around with various Windows PowerShell cmdlets—just to see what they do and to figure out how I might use them. One thing I saw was the Windows Error Reporting module. I also saw that it has three cmdlets exposed. Unfortunately, as of yet, there is no Help for this module. But hey, this is Windows PowerShell—and PowerShell is PowerShell is PowerShell! Therefore, it should just work.
Exploring the WindowsErrorReporting module
The Windows Error Reporting module contains three cmdlets. I found this by using the Get-Command cmdlet as shown here.
Note I do not need to type the entire module name—only enough to be specific; the good thing is I can use wild cards.
PS C:\> Get-Command -Module windowserror*
CommandType Name ModuleName
———– —- ———-
Cmdlet Disable-WindowsErrorReporting WindowsErrorRe…
Cmdlet Enable-WindowsErrorReporting WindowsErrorRe…
Cmdlet Get-WindowsErrorReporting WindowsErrorRe…
What is nice about this module is that I can use it to skip a step in configuring a new installation of Windows 8 because one of the steps is setting Windows Error Reporting. With a single Windows PowerShell command, I can completely skip this step.
Finding the current Windows Error Reporting setting
One way to see what the current Windows Error Reporting setting is, is to search for “Windows Error Reporting” in Windows Search, and then select the Problem Reporting Settings program that results from the search. The settings page is shown here.
This is all well and good, but I prefer to use Windows PowerShell. Because Windows PowerShell always runs on my system, it is far easier than grabbing the mouse, trying to find the charms that appear and disappear, and then selecting Search and looking through a list of programs—none of which seem to contain the Windows Error Reporting moniker.
To find the current Windows Error Reporting setting, I only need to type Get-WindowsErrorReporting, as shown here.
PS C:\> Get-WindowsErrorReporting
Note To retrieve the Windows Error Reporting setting does not require Admin rights. To enable or to disable the Windows Error Reporting settings does require Admin rights.
Disabling or enabling Windows Error Reporting
To disable Windows Error Reporting, I use the Disable-WindowsErrorReporting cmdlet. This cmdlet return a Boolean value, True / False, depending upon the success or failure of the command in making the change. In the following command, I successfully disable Windows Error Reporting on my laptop.
PS C:\> Disable-WindowsErrorReporting
Disabling the Windows Error Reporting settings in this way corresponds with the Never check for solutions (not recommended) setting that appears in the following image.
I can also use the Get-WindowsErrorReporting cmdlet to ensure that the command successfully completed, as shown here.
PS C:\> Get-WindowsErrorReporting
Enabling Windows Error Reporting through Windows PowerShell
I can also use Windows PowerShell to enable Windows Error Reporting by using the Enable-WindowsErrorReporting cmdlet, as shown here.
Well, I need to go. We are spending the day with the Windows PowerShell User Group Leader, Jeff Wouters, for the Dutch Windows PowerShell User Group. We are heading out to Friesland to see some of the really cool black horses—they are Teresa’s favorites. I imagine we will also have a good time discussing Windows PowerShell as well. See you tomorrow as we head back to Dortmond to see, once again, Klaus Schulte on our way to Geneva. “Have laptop … will travel.” Take care, and have a wonderful day.
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at firstname.lastname@example.org, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.
Ed Wilson, Microsoft Scripting Guy