Modularizing PowerShell: Making Code Portable
summary
Four-hour workshop that walks through taking copy‑pasted scripts and turning them into reusable PowerShell modules with concrete steps: move functions into PSM1 and module manifest, use commandletbinding, parameter sets and ShouldProcess for confirmation and pipeline-safe begin/process/end/clean blocks, lint with PSScriptAnalyzer and Test-ModuleManifest, set PSModulePath or profile, split monoliths into public/private files, generate an API key and successfully publish to the PowerShell Gallery.
AI-written summary · about
chapters (18)
- 0:00Modularizing PowerShell
- 2:40Why modularize scripts
- 3:03Clean code formatting
- 11:16Parameters in scripts
- 16:41Functions in PowerShell
- 23:18Modules vs dot sourcing
- 24:31Comment-based help
- 29:24Module manifests
- 33:43Module paths
- 37:52Profiles for automation
- 39:51Alternatives to backticks
- 43:00Advanced function features
- 55:41Error handling
- 1:01:54Begin/process/end blocks
- 1:08:26Clean block for cleanup
- 1:09:38Publishing to Gallery
- 1:14:51Testing with PSScriptAnalyzer
- 1:21:46When to use functions
related talks
03h 04mMastering Making Modules
46mFrom Script to Tool: Building Robust, Meaningful Tools with PowerShell
47mBuilding and Publishing Reusable PowerShell Tools
45mDon’t Stop at the PowerShell Pipeline. Build a CI/CD Pipeline for your PowerShell
51mPowerShell module toolbox and templates for Continuous Delivery
49mStop manually publishing your modules. Automate it in 2 minutes!
46mPowerShell as an MCP Tooling Host: Using MCPServerPS to Supercharge AI-Assisted...
01h 03mThe Zen of Powershell - PowerShell for the C# dev
