DEV Community

AdminPackStudio
AdminPackStudio

Posted on

Kernel-Power Event 41 and Event 6008: A Read-First Unexpected Shutdown, Bug Check, and Power Triage

Helpdesk: "A production server restarted overnight and nobody touched it. The System log shows Kernel-Power Event 41 ('The system has rebooted without cleanly shutting down first') and an EventLog Event 6008 ('The previous system shutdown ... was unexpected'). The vendor says it is a Windows bug, the datacenter says power was fine, and a manager wants a root cause by lunch."

Neither event is the root cause. Event 41 and Event 6008 are both receipts: they say the previous shutdown was not clean, and they don't say why. Microsoft's Learn article on Event 41 says that by itself the event "might not contain sufficient information to explicitly define what occurred," and that you typically also have to consider what was happening at the time, such as a failed power supply. The useful part is in the event data and in what was logged just before the shutdown.

This post is a read-first order: confirm it was really unexpected, read the Event 41 fields, sort the restart into one of Microsoft's three scenarios, and only then spend time on drivers, dumps, or hardware.

TL;DR

  • Confirm the reboot was unexpected. Microsoft's reboot-log article says a normal reboot is Event 1074 followed by 13 and 6009, while an unexpected one is Event 41 and Event 6008, often with no 1074.
  • Read three Event 41 fields: BugcheckCode, PowerButtonTimestamp, and SleepInProgress.
  • A nonzero BugcheckCode means a Stop error. Convert the decimal value to hex and work the bug check, not the Event 41.
  • A nonzero PowerButtonTimestamp means someone held the power button.
  • All zeros, or no Event 41 at all, points at power, hardware, or a hang. Also check for a crash dump that could not be written (Event 46 from volmgr).
  • Read the System and Application logs before the time named in Event 6008.

Step 1: Was it unexpected? Build a reboot timeline (read-only)

Microsoft's article on unexpected reboots lists the event IDs to filter on: 12, 13, 19, 41, 1001, 1074, 6008, 6009, and 7045. Event IDs can come from different sources, so filter on the right ones:

Event ID Source What it tells you
1074 User32 A process or user initiated a restart or shutdown (planned).
13 Kernel-General The operating system is shutting down.
6006 EventLog The event log service was stopped cleanly.
6009 EventLog Operating system version banner at startup.
41 Kernel-Power The system rebooted without cleanly shutting down first.
1001 WER-SystemErrorReporting The computer rebooted from a bug check, with the bug check code and dump path.
6008 EventLog The previous system shutdown was unexpected.
7045 Service Control Manager A service was installed (useful for spotting a recent change).
$ids = 12,13,19,41,1001,1074,6006,6008,6009,7045
Get-WinEvent -FilterHashtable @{ LogName='System'; Id=$ids; StartTime=(Get-Date).AddDays(-14) } -ErrorAction SilentlyContinue |
    Sort-Object TimeCreated |
    Select-Object TimeCreated, Id, ProviderName,
        @{n='Message';e={ ($_.Message -split "`r?`n")[0] }} |
    Format-Table -AutoSize -Wrap
Enter fullscreen mode Exit fullscreen mode

Look for the pattern. Event 1074 then 13 then 6009 is a planned restart. Event 41 plus 6008 with no 1074 is not. Event 41 and 1001 together mean a bug check. When it first started matters too: note the first unexpected reboot and whether a new driver, update, or application was installed shortly before it.

Step 2: Read the Event 41 fields (read-only)

$e = Get-WinEvent -FilterHashtable @{ LogName='System'; ProviderName='Microsoft-Windows-Kernel-Power'; Id=41 } -MaxEvents 10
$e | ForEach-Object {
    $x = [xml]$_.ToXml()
    $d = @{}
    foreach ($n in $x.Event.EventData.Data) { $d[$n.Name] = $n.'#text' }
    [pscustomobject]@{
        Time        = $_.TimeCreated
        BugcheckDec = $d['BugcheckCode']
        BugcheckHex = if ($d['BugcheckCode']) { '0x{0:X8}' -f [int64]$d['BugcheckCode'] } else { '' }
        Param1      = $d['BugcheckParameter1']
        PowerButton = $d['PowerButtonTimestamp']
        Sleep       = $d['SleepInProgress']
    }
} | Format-Table -AutoSize
Enter fullscreen mode Exit fullscreen mode

Microsoft notes that Event 41 records the bug check code in decimal, while most bug check documentation uses hexadecimal. Its example: 159 converts to 0x0000009F. The script above does that conversion for you.

Step 3: Sort it into one of Microsoft's three scenarios (read-only)

What Event 41 shows Scenario Where to look
BugcheckCode is nonzero 1: Stop error The bug check code and its parameters, the dump file, recent driver and update changes.
PowerButtonTimestamp is nonzero 2: power button held Why the machine needed a hard reset: usually a hang. Ask what the user or operator saw.
Both zero, or no Event 41 3: hang, power loss, or hardware Power supply, UPS, memory, overheating, a hypervisor or management-controller restart.

The three scenarios and their conditions come from Microsoft's Event 41 article. Don't skip the sort: a bug check and a power interruption are fixed in completely different places.

Step 4: Scenario 1, a Stop error (read-only first)

  1. Take the hex value from Step 2 and look it up in Microsoft's Bug Check Code Reference.
  2. Find the Event 1001 next to the Event 41. It has the bug check text and the dump path, normally C:\Windows\MEMORY.DMP.
  3. Check what changed shortly before the first crash: driver installs or updates, application installs, OS updates.

Microsoft's Stop error guidance for Windows Server gives a checklist that applies to most codes: review the Stop codes in the event log, keep 10 to 15 percent free disk space, update drivers and applications when a specific driver is named, install the latest Windows updates, update BIOS and firmware, run hardware and memory tests, run an anti-malware scan, and remove newly installed software if the problem began after an install.

That article also gives code-specific advice. For example, for 0x0000009F (DRIVER_POWER_STATE_FAILURE) it suggests checking Device Manager for flagged devices, updating the related driver, checking for a newer ACPI/BIOS or other firmware, and temporarily disabling power saving to isolate the cause. For 0x0000001A (MEMORY_MANAGEMENT) it suggests the Windows Memory Diagnostic.

# What crash artifacts exist?
Get-ChildItem C:\Windows\MEMORY.DMP -ErrorAction SilentlyContinue | Select-Object FullName, Length, LastWriteTime
Get-ChildItem C:\Windows\Minidump -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 5 Name, Length, LastWriteTime
Enter fullscreen mode Exit fullscreen mode

If you need a dump analyzed, collect it as the Stop error guidance describes before involving the vendor.

Step 5: Scenario 2, the power button (read-only)

A nonzero PowerButtonTimestamp with a zero bug check code is what Microsoft documents for a hold-the-power-button restart. The real question is why: the machine was probably unresponsive. Check what the console showed, whether the System log has a gap before the restart, and whether a particular workload was running. Microsoft's article suggests the Caps Lock test to tell a hard hang from a slow machine: if the keyboard light doesn't change when you press the key, the machine may be unresponsive.

Step 6: Scenario 3, all zeros or no Event 41 (read-only)

When both values are zero, or the event is missing, Microsoft says something stopped Windows from generating or writing error codes: write access to the disk was blocked, as in a hard hang, or the computer shut down too fast to write them. This often indicates a power supply problem. Microsoft lists these possible conditions: the battery was removed or drained, the machine was unplugged or lost power, or the power supply is underpowered or faulty.

Check two things before blaming hardware:

  1. A crash dump that could not be written. Microsoft notes that all values being zero can happen alongside Event 46 from volmgr ("Crash dump initialization failed!"), for example when the computer started without a configured dump file. The default dump file is the pagefile. A bug check could still be the cause, but Windows can't record the type in Event 41. Check the pagefile and dump configuration.
Get-WinEvent -FilterHashtable @{ LogName='System'; ProviderName='volmgr'; Id=46 } -MaxEvents 5 -ErrorAction SilentlyContinue |
    Select-Object TimeCreated, Id, Message
Get-CimInstance Win32_OSRecoveryConfiguration | Select-Object DebugInfoType, DebugFilePath, AutoReboot
Enter fullscreen mode Exit fullscreen mode
  1. A restart from outside the operating system. Microsoft's list includes: a physical server restarted by Automatic Server Recovery (ASR) software that decided it was unresponsive; a Hyper-V VM (not in a cluster) restarted by the Hyper-V heartbeat feature when the host stops seeing a heartbeat; a clustered Hyper-V VM with the heartbeat monitoring option enabled; and a VMware VM with its heartbeat feature, or a third-party cluster. Check the hypervisor or management-controller logs for a restart at the same time.

If those don't explain it, the hardware checks from the article are: disable overclocking, check memory health and configuration, check the power supply wattage against the installed devices (and consider a UPS if power was interrupted), and check for overheating.

Step 7: Read what happened before the shutdown (read-only)

Event 6008 names the time of the previous shutdown. Microsoft's Event 41 article tells you to check for suspicious events before that time in both the Application and System logs.

$e6008 = Get-WinEvent -FilterHashtable @{ LogName='System'; ProviderName='EventLog'; Id=6008 } -MaxEvents 1
$e6008 | Select-Object TimeCreated, Message   # read the shutdown time in the message text

# Set this to the shutdown time named in the Event 6008 message
$end   = Get-Date '2026-01-01 03:12'
$start = $end.AddMinutes(-30)
Get-WinEvent -FilterHashtable @{ LogName=@('System','Application'); StartTime=$start; EndTime=$end; Level=1,2,3 } -ErrorAction SilentlyContinue |
    Sort-Object TimeCreated |
    Select-Object TimeCreated, LogName, ProviderName, Id, @{n='Msg';e={ ($_.Message -split "`r?`n")[0] }} |
    Format-Table -AutoSize -Wrap
Enter fullscreen mode Exit fullscreen mode

Remember that the time in an event is shown in the viewing computer's time zone, so check the time zone of the server. Disk, storage controller, driver, and service errors in the last minutes are the best leads.

Step 8: Make the next crash easier to read (deliberate change)

Only after you've decided it is a real problem and not a one-off power cut:

  1. Confirm the dump settings (the Step 6 script) so a bug check is recorded in Event 41 and a dump is written.
  2. Microsoft notes that if you see a Stop error with a bug check code on screen but Event 41 doesn't contain it, you can clear Automatically restart under System Properties > Advanced > Startup and Recovery > Settings so the screen stays up. Use that on a machine you can reach, and put it back afterwards.
  3. Update drivers and firmware per the vendor, one change at a time, and note the date of each.

Microsoft also describes the Reliability registry key at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability: the values DirtyShutdown, LastAliveStamp, and TimeStampInterval can be cleared to stop the Shutdown Event Tracker prompt appearing after an unexpected shutdown. That changes the prompt, not the cause. Export the key first and don't clear it until you've captured the evidence.

Step 9: Prove it (read-only)

Get-WinEvent -FilterHashtable @{ LogName='System'; Id=41,6008; StartTime=(Get-Date).AddDays(-30) } -ErrorAction SilentlyContinue |
    Group-Object { $_.TimeCreated.Date } | Sort-Object Name | Select-Object Name, Count
Enter fullscreen mode Exit fullscreen mode

Watch the count per day over a full cycle of the workload that was running when the crashes occurred. No new Event 41 or 6008 over that cycle is the proof. Fewer is not.

Common false starts

  • "Event 41 is a Windows bug." It is the next-boot report of a shutdown that wasn't clean. Microsoft says it can be caused by a stopped response, a crash, or lost power.
  • "6008 told us the cause." It only gives the time of the previous shutdown.
  • "Replace the PSU." Do that after BugcheckCode is zero and the dump and pagefile configuration are ruled out.
  • "Ignore it, the server came back." A repeating Event 41 is a hardware, driver, or power issue that hasn't been found yet.
  • "Clear the dirty shutdown registry values." It hides the prompt, not the cause.

FAQ

What is the difference between Event 41 and Event 6008?
Event 41 (Kernel-Power) is logged at the next boot when Windows wasn't shut down cleanly. Event 6008 (EventLog) says the previous shutdown was unexpected and gives its time.

Why is the Event 41 bug check code a decimal number?
Microsoft notes the event stores the decimal value, while bug check references use hex. Convert it, for example 159 to 0x0000009F.

Why is there an Event 41 but no dump file?
Check for Event 46 from volmgr and the pagefile and dump configuration. Microsoft notes that all-zero Event 41 data can go with a crash dump that couldn't initialize.

Can a VM log Event 41 without any bug check?
Yes. Microsoft lists the Hyper-V heartbeat feature, clustered heartbeat monitoring, and VMware's heartbeat feature as possible reasons a guest was restarted.

When is Event 41 safe to ignore?
When you know why the reboot was unclean, such as a power cut or a forced reset during an outage, and it doesn't repeat.


Related posts

Free checklist

An unexplained restart on a server is a good reminder that the changes made around it need a plan. So does a Conditional Access policy enforced before anyone read the report-only results. The free Conditional Access pre-enforcement checklist keeps break-glass accounts, pilot groups, and report-only review on one page:

👉 https://cashflow4375.gumroad.com/l/ujkqxb?utm_source=devto&utm_medium=article&utm_campaign=aps_first_sale&utm_content=kernel-power-event-41

If you want the rest of the Intune runway written down for the team (enrollment hygiene, compliance phasing, break/fix cards and read-only PowerShell snapshots), the Intune & M365 Admin Starter Pack pairs with this triage: https://cashflow4375.gumroad.com/l/joonf?utm_source=devto&utm_medium=article&utm_campaign=aps_first_sale&utm_content=kernel-power-event-41


Top comments (0)