Skip to content

Instantly share code, notes, and snippets.

#has a group policy change occured recently
Get-WinEvent -FilterHashTable @{LogName="Microsoft-Windows-GroupPolicy/Operational";id=4016} | Select `
Machinename, TimeCreated, ID, @{n= "Message";e={($_.Message -Replace “`r`n|`r|`n”,” ”).Trim()}}
@chadmcox
chadmcox / findSneakyADServiceAccounts.ps1
Last active August 29, 2024 16:27
This powershell script will assist in finding accounts that would make great targets for Kerberoasting. This script will also assist in validating spn's defined on user objects.
#Requires -Module activedirectory
#Requires -version 4.0
<#PSScriptInfo
.VERSION 1.5
.GUID 31adb560-b189-4b0c-86a7-7862d8e78094
.AUTHOR Chad.Cox@microsoft.com
https://blogs.technet.microsoft.com/chadcox/
https://github.com/chadmcox