← Back to Guides Homepage

Find Out What Restarted Your Windows Server

In this guide, you will learn how to determine the cause of a server restart—whether it was an unexpected crash or a planned update—by analyzing Windows logs in a controlled environment.

Part 1: Simulating a Crash with NotMyFault

To understand what an unexpected restart looks like in the logs, we will first simulate a crash using a tool from the Sysinternals suite called NotMyFault.

1. Download and Run the Tool

Search for "NotMyFault" on the Sysinternals Microsoft Learn page. This tool is designed to crash, hang, or cause memory leaks on a Windows system for diagnostic purposes.

After downloading, extract the files and run the 64-bit version of the application.

2. Trigger the Crash

The interface is simple. Select a crash type (or leave the default) and press the Crash button. This will immediately trigger a "Blue Screen of Death" and force the virtual machine to restart.

Part 2: Analyzing Logs for Unexpected Shutdowns

After the server reboots and you log back in, you may see a popup asking why the computer shut down unexpectedly. To find the real technical reason, we must look at the Event Viewer.

1. Access Event Viewer

Right-click the Start menu and select Event Viewer. Navigate to Windows Logs and then select the System tab.

2. Filter the Logs

Click on Filter Current Log. In the field for "All Event IDs," paste the specific Event ID string that tracks restarts (e.g., 41, 1074, 6005, 6006, 6008).

41, 1074, 6005, 6006, 6008

3. Interpret the Results

Review the filtered events around the timestamp of the restart.

Part 3: Analyzing Logs for Controlled Restarts

Next, we can compare the previous logs with those generated by a controlled, planned restart, such as one initiated by Windows Update.

1. Perform a Controlled Restart

Install pending Windows Updates and allow the server to restart normally. When you log back in, you will not see the "unexpected shutdown" popup.

2. View the "Planned" Event Logs

Open Event Viewer and apply the same Event ID filter used previously.

This time, look for events indicating a "clean" restart. You will likely see details stating the operating system service pack was "planned". This confirms the restart was intentional and not the result of a system failure.

← Back to Guides Homepage