Automation
PowerShell Ops Toolbox
A growing library of PowerShell scripts for the problems that actually show up running Windows/AD environments: BitLocker + Autopilot enrollment, stale account audits, ACL reporting, license checks.
Started
Jun 14, 2022
Updated
Jan 04, 2023
Repository
Private · docs only
Live
—
What's in it
No grand framework here — this is the toolbox I actually reach for, added to slowly whenever something manual became annoying enough to script. A few of the more useful ones:
- BitLocker + Autopilot enrollment — checks TPM status, enables it if needed, confirms the volume isn't already encrypted, and wires in
Get-WindowsAutopilotInfoso a machine comes out of imaging already enrolled instead of needing a second manual pass. - 45-day inactive account audit — pulls every enabled AD account, filters to anything with no logon in 45+ days, and drops a timestamped CSV straight into Explorer. The kind of report that's trivial to write and easy to forget to run — so it's a script, not a mental note.
- Folder ACL recursion — walks a file share recursively, resolves the access rights on every subfolder into a flat JSON report. Built for exactly one painful permissions audit; kept because it'll be needed again.
- Windows activation / license status — a one-liner that pulls the real product key and license state via
Get-CimInstance, for when the GUI activation dialog says just enough to be useless.
Why no framework
Most of these solve a specific, narrow problem well rather than trying to generalize into a platform. That's a deliberate choice at this scale — a shared module and a versioned release process are worth it once a script family gets reused across a team; for a personal toolbox, the overhead isn't paid for yet.
Lessons learned
The scripts that survive years of use are the ones that fail loudly and immediately (bad path, missing module) rather than the ones that try to be clever about error handling. Half of these have no try/catch at all, on purpose — a script that dies with a stack trace on line 12 is more debuggable at 8am than one that swallowed an error and produced a quietly wrong CSV.