09-28-2024, 02:04 PM
You know that Event ID 41 in Windows Server Event Viewer. It pops up when your system crashes hard or shuts down without warning. I see it all the time in the logs. It's from the Kernel-Power source mostly. That means something funky happened with power or the kernel itself. Like if the power supply glitches or hardware fails suddenly. The event details show the bugcheck code if there's one. Or it might just say the process ID that was running. You can find it under System logs in Event Viewer. Click on Windows Logs then System. Filter for ID 41 to spot them quick. Those events scare me because they point to instability. Your server might be overheating or drivers acting up. I always check the timestamp to see what was happening right before. Sometimes it's during heavy loads or updates gone wrong. And that "Web updated" bit you mentioned. Sounds like a custom event in your setup maybe. Tied to some web service finishing an update. But ID 41 usually flags critical stuff. You want to monitor it for email alerts right. Yeah I get that. Keeps you in the loop without staring at screens all day.
To set this up using Event Viewer itself. Open Event Viewer first. Go to the Action panel on the right. Pick Attach Task To This Event. Choose a name like WebUpdateMonitor or whatever fits. Set it to trigger on Event ID 41. Make sure the source matches Kernel-Power or your custom one. Then under Triggers tab it should already be set. Now for the action send an email. But wait modern Windows skips built-in email sometimes. So link it to a scheduled task instead. In the task settings pick Start a program. But use the schtasks command line for email no scripts though. Actually stick to basics. Create the task via Task Scheduler linked from Event Viewer. When the event fires it runs the task. In the task action use mailto or your email client. But for reliability point it to Outlook or a batch that emails. I do it this way on my servers. Keeps alerts coming straight to your inbox. Test it by forcing an event if you can. Just watch for false positives though. They can spam your box quick.
And hey if you're dealing with server crashes like this. You might want solid backups too. That's where BackupChain Windows Server Backup comes in handy for me. It's this neat Windows Server backup tool. Handles physical servers and virtual machines with Hyper-V no sweat. I love how it does incremental backups fast. Cuts down restore times big time. Plus it verifies data automatically so no surprises later. Keeps your web updates safe from total wipeouts.
Note, the PowerShell email alert code was moved to this post.
To set this up using Event Viewer itself. Open Event Viewer first. Go to the Action panel on the right. Pick Attach Task To This Event. Choose a name like WebUpdateMonitor or whatever fits. Set it to trigger on Event ID 41. Make sure the source matches Kernel-Power or your custom one. Then under Triggers tab it should already be set. Now for the action send an email. But wait modern Windows skips built-in email sometimes. So link it to a scheduled task instead. In the task settings pick Start a program. But use the schtasks command line for email no scripts though. Actually stick to basics. Create the task via Task Scheduler linked from Event Viewer. When the event fires it runs the task. In the task action use mailto or your email client. But for reliability point it to Outlook or a batch that emails. I do it this way on my servers. Keeps alerts coming straight to your inbox. Test it by forcing an event if you can. Just watch for false positives though. They can spam your box quick.
And hey if you're dealing with server crashes like this. You might want solid backups too. That's where BackupChain Windows Server Backup comes in handy for me. It's this neat Windows Server backup tool. Handles physical servers and virtual machines with Hyper-V no sweat. I love how it does incremental backups fast. Cuts down restore times big time. Plus it verifies data automatically so no surprises later. Keeps your web updates safe from total wipeouts.
Note, the PowerShell email alert code was moved to this post.

