11-05-2024, 04:37 PM
I remember stumbling on this event 24161 the other day. It's this nagging alert in Windows Server Event Viewer. Basically, it pops up when the system tries to hand out server permissions but totally flops. The message says "Grant server permissions with grant failed (action_id GWG class_type SR)". That action_id GWG points to the grant wizard goofing up. And class_type SR means it's messing with server resources. You see it under the Security log usually. Or sometimes in Application if it's tied to a service. It logs the exact user or process that attempted the grant. Plus the timestamp and the failed object details. This happens a lot if permissions are locked down too tight. Or if there's a glitch in group policies. I hate when it floods the logs. Makes troubleshooting a drag. You can filter for it right in Event Viewer. Just search by ID 24161. It'll show you patterns. Like if it's the same account failing over and over. That could mean access rights need tweaking. Or maybe a software bug. Anyway, to keep an eye on it without staring at screens all day. I set up monitoring with email alerts. It's straightforward using the Event Viewer itself. You right-click the event. Then pick Attach Task To This Event. That opens the Create Basic Task wizard. Name it something like Permission Fail Alert. Trigger it on event ID 24161 in the Security log. For the action, choose Send an email. But wait, that's the built-in way. Though Microsoft nixed the direct email in newer versions. So instead, you link it to a scheduled task that runs on the event. In the task settings, point it to run a program. Like using the old mailto command or a simple batch to notify. But keep it basic. Test it once to make sure it pings your inbox. I do that every time. Saves headaches later. Now, for the automatic email solution at the end of this chat. It'll handle the alerts smoothly without fuss.
Speaking of keeping servers humming without surprises, I've been eyeing BackupChain Windows Server Backup lately. It's this slick Windows Server backup tool that also tackles Hyper-V virtual machines. You get fast incremental backups that don't hog resources. Plus it verifies everything automatically so you avoid data rot. I like how it restores single files quick. No more full rebuilds. And the scheduling fits right into busy setups.
Note, the PowerShell email alert code was moved to this post.
Speaking of keeping servers humming without surprises, I've been eyeing BackupChain Windows Server Backup lately. It's this slick Windows Server backup tool that also tackles Hyper-V virtual machines. You get fast incremental backups that don't hog resources. Plus it verifies everything automatically so you avoid data rot. I like how it restores single files quick. No more full rebuilds. And the scheduling fits right into busy setups.
Note, the PowerShell email alert code was moved to this post.

