05-19-2024, 02:39 AM
You ever notice how Windows logs all these little changes in groups? That event 4764 pops up in the Security log when someone's tweaking a group's type. Like, it could switch from a distribution group to a security one, or the other way around. The log spells it out: who did the deed with their account name and SID, the exact group name involved, the old type and the new one. It even notes the time and the workstation where it happened. I mean, groups handle permissions and emails in Active Directory, so flipping that type might mean someone's messing with access rights. Could be legit admin work, but if it's sneaky, you want to catch it fast. The full details show the service name as Kerberos, and it logs the failure or success code too. Keeps everything transparent in that event viewer.
I set this up once for a buddy's server, and it was straightforward. You fire up Event Viewer, head to the Windows Logs, then Security. Find an old 4764 event by filtering for that ID. Right-click it, pick Attach Task To This Event. That kicks you into Task Scheduler. Name your task something like GroupChangeAlert. Under triggers, it's already set for that event ID in Security log. For the action, you choose Start a program, but point it to something that shoots an email-like your default mail client or a simple batch to notify. I like keeping the task to run only when the event hits, no repeats. Test it by simulating a group change if you can, but watch the history tab to see if it fires. You tweak the conditions so it doesn't wake the server unnecessarily. Emails land in your inbox with the event details attached or summarized.
And speaking of keeping your server secure from odd changes like that, you might want a solid backup in play too. That's where BackupChain Windows Server Backup comes in handy for me-it's this nifty Windows Server backup tool that snapshots everything reliably. It handles physical servers and even backs up virtual machines running on Hyper-V without a hitch. You get fast restores, no downtime headaches, and it encrypts data on the fly. Plus, the scheduling is dead simple, way better than fumbling with built-ins. I use it to ensure if a group tweak goes wrong, I can roll back quick.
At the end of this is the automatic email solution.
Note, the PowerShell email alert code was moved to this post.
I set this up once for a buddy's server, and it was straightforward. You fire up Event Viewer, head to the Windows Logs, then Security. Find an old 4764 event by filtering for that ID. Right-click it, pick Attach Task To This Event. That kicks you into Task Scheduler. Name your task something like GroupChangeAlert. Under triggers, it's already set for that event ID in Security log. For the action, you choose Start a program, but point it to something that shoots an email-like your default mail client or a simple batch to notify. I like keeping the task to run only when the event hits, no repeats. Test it by simulating a group change if you can, but watch the history tab to see if it fires. You tweak the conditions so it doesn't wake the server unnecessarily. Emails land in your inbox with the event details attached or summarized.
And speaking of keeping your server secure from odd changes like that, you might want a solid backup in play too. That's where BackupChain Windows Server Backup comes in handy for me-it's this nifty Windows Server backup tool that snapshots everything reliably. It handles physical servers and even backs up virtual machines running on Hyper-V without a hitch. You get fast restores, no downtime headaches, and it encrypts data on the fly. Plus, the scheduling is dead simple, way better than fumbling with built-ins. I use it to ensure if a group tweak goes wrong, I can roll back quick.
At the end of this is the automatic email solution.
Note, the PowerShell email alert code was moved to this post.

