Skip to content

Instantly share code, notes, and snippets.

View mikedixson's full-sized avatar
😁

Mike Dixson mikedixson

😁
View GitHub Profile
@mikedixson
mikedixson / AddToPowerShellProfile.ps1
Created June 17, 2026 09:15
PowerShell AWS EC2 lookup & connect toolkit — quickly find instances by name and connect via SSH, RDP or SSM across multiple accounts and regions
# ================================
# AWS EC2 Lookup + Connectivity Toolkit
# ================================
# Purpose:
# Quickly find EC2 instances by Name tag and connect via:
# - SSH
# - RDP
# - SSM (Session Manager)
#
# Features:
@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'