Skip to content

Instantly share code, notes, and snippets.

View mikedixson's full-sized avatar
😁

Mike Dixson mikedixson

😁
View GitHub Profile
@mikedixson
mikedixson / Lithnet_Audit_existing_passwords.ps1
Created June 5, 2025 09:28
Lithnet Password Protection for AD Audit Script
Import-Module LithnetPasswordProtection
$file = "get-pwned-users.csv";
"accountName,UPN,pwdLastSet,lastLogin,accountDisabled" | out-file $file
$Searcher = New-Object System.DirectoryServices.DirectorySearcher
$Searcher.PageSize = 200
$Searcher.SearchScope = "subtree"
@mikedixson
mikedixson / ubuntu-ami-clean.sh
Last active July 27, 2022 14:50 — forked from garlandkr/ami-clean.sh
Clean-up an Amazon EC2 instance before creating an AMI
#!/bin/bash
# Run this script with:
# bash <(curl -s https://gist.githubusercontent.com/mikedixson/ab4365d7ff43c5fcbdaef9e4a5a186ac/raw/df8d4e298a0f1d9b34b134797f9993896db36970/ubuntu-ami-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
print_green 'Clean apt'