Skip to content

PowerShell Tips

Commands Tips

PowerShell Encrypt and Decrypt Strings with AES in Scripts
─□✕
PowerShell Encrypt and Decrypt Strings with AES in Scripts
June 25, 2026 PowerShell Tips Editor 3 min read

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.

Useful Scripts and Recipes
Get-Content readme.md
PowerShell Folder Size Reporter with Top-N Largest Folders
─□✕
PowerShell Folder Size Reporter with Top-N Largest Folders
June 24, 2026 PowerShell Tips Editor 3 min read

PowerShell Folder Size Reporter with Top-N Largest Folders

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.

Files and Folders
Get-Content readme.md
PowerShell Process CPU and Memory Monitoring Over Time
─□✕
PowerShell Process CPU and Memory Monitoring Over Time
June 23, 2026 PowerShell Tips Editor 4 min read

PowerShell Process CPU and Memory Monitoring Over Time

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.

Process and Service Management
Get-Content readme.md
PowerShell Exchange Online Distribution Group Audit
─□✕
PowerShell Exchange Online Distribution Group Audit
June 22, 2026 PowerShell Tips Editor 2 min read

PowerShell Exchange Online Distribution Group Audit

Distribution groups accumulate without governance. This audit script reports every group’s membership count, owners, external sender settings, and flags groups that need review.

Cloud and Microsoft 365
Get-Content readme.md
PowerShell Desired State Configuration: Push vs Pull Mode
─□✕
PowerShell Desired State Configuration: Push vs Pull Mode
June 21, 2026 PowerShell Tips Editor 2 min read

PowerShell Desired State Configuration: Push vs Pull Mode

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.

System Administration
Get-Content readme.md
PowerShell Get-ADUser Attribute Deep Dive: All Properties
─□✕
PowerShell Get-ADUser Attribute Deep Dive: All Properties
June 20, 2026 PowerShell Tips Editor 4 min read

PowerShell Get-ADUser Attribute Deep Dive: All Properties

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

Active Directory and Users
Get-Content readme.md
PowerShell StringBuilder Pattern for Large Text Generation
─□✕
PowerShell StringBuilder Pattern for Large Text Generation
June 19, 2026 PowerShell Tips Editor 5 min read

PowerShell StringBuilder Pattern for Large Text Generation

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

Strings and Text
Get-Content readme.md
PowerShell TCP Port Scanner: Fast Multi-Host Port Checks
─□✕
PowerShell TCP Port Scanner: Fast Multi-Host Port Checks
June 18, 2026 PowerShell Tips Editor 4 min read

PowerShell TCP Port Scanner: Fast Multi-Host Port Checks

Before deploying firewall changes, verifying connectivity across your estate is essential. This parallel port scanner checks multiple hosts and ports simultaneously and exports

Networking
Get-Content readme.md
PowerShell JSON Config Files: Managing Script Settings Cleanly
─□✕
PowerShell JSON Config Files: Managing Script Settings Cleanly
June 17, 2026 PowerShell Tips Editor 5 min read

PowerShell JSON Config Files: Managing Script Settings Cleanly

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.

Useful Scripts and Recipes
Get-Content readme.md
PowerShell Active Directory Fine-Grained Password Policies
─□✕
PowerShell Active Directory Fine-Grained Password Policies
June 16, 2026 PowerShell Tips Editor 4 min read

PowerShell Active Directory Fine-Grained Password Policies

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.

Active Directory and Users
Get-Content readme.md
« prev1234…27next »

Recent Posts

  • PowerShell DNS Record Audit: Export All Zone Records to CSV
  • PowerShell Script: Automated User Offboarding Checklist
  • PowerShell Active Directory Replication Status Check Script
  • PowerShell Error Handling: Terminating vs Non-Terminating Errors
  • PowerShell Windows Update Management Across Multiple Servers

Recent Comments

No comments to show.

Archives

  • July 2026
  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026

Categories

  • Active Directory and Users
  • Advanced
  • Basics
  • Cloud and Microsoft 365
  • Error Handling
  • Files and Folders
  • Functions and Modules
  • Getting Started
  • Loops and Conditions
  • Networking
  • Pipeline and Filtering
  • Process and Service Management
  • Scripting
  • Strings and Text
  • System Administration
  • Useful Scripts and Recipes
  • Variables and Data Types
PS C:\> Get-Copyright 2026 PowerShell Tips | Command In Line
FlipAnimation app icon
Hand-draw your next README GIF
FlipAnimation turns your phone into an animation studio · GIF + MP4 export
App Store Google Play
Sponsored