PowerShell Encrypt and Decrypt Strings with AES in Scripts
Storing plaintext passwords in scripts is a cardinal sin. This guide shows how to use .NET AES to encrypt sensitive config values in PowerShell with proper IV and key management.
Commands Tips
Storing plaintext passwords in scripts is a cardinal sin. This guide shows how to use .NET AES to encrypt sensitive config values in PowerShell with proper IV and key management.
Finding where disk space went requires a fast recursive folder-size script. This guide builds one that handles deep trees, skips reparse points, and ranks folders by size clearly.
Spotting a process that gradually leaks memory or spikes CPU requires time-series data, not a snapshot. This script samples processes at intervals and trends the results over time.
Distribution groups accumulate without governance. This audit script reports every group’s membership count, owners, external sender settings, and flags groups that need review.
DSC push mode is simpler but pull mode scales to hundreds of nodes. This guide compares both modes, configures the LCM for pull, and implements a drift detection feedback loop.
Get-ADUser returns only 10 default attributes. This post explains the -Properties behavior, what every important attribute means, and how to build efficient attribute-targeted
String concatenation with += in a loop is one of PowerShell’s worst performance patterns. StringBuilder eliminates the O(n squared) overhead for scripts generating large text
Before deploying firewall changes, verifying connectivity across your estate is essential. This parallel port scanner checks multiple hosts and ports simultaneously and exports
Hardcoding server names and thresholds in scripts is an anti-pattern. JSON config files externalise settings, making scripts environment-agnostic and much easier to maintain.
Fine-Grained Password Policies let you apply different password rules to different user groups in AD. This guide manages PSOs entirely through PowerShell with full audit reporting.