Write Modules, Not Scripts
summary
A concrete five-step recipe: start from a single line, refactor into a function, add comment-based help, make a .psm1 and .psd1 manifest, install into the user module path and verify autoloading. Demonstration uses Get-CimInstance, an add-help snippet and a copy-modules installer, creates a Get-Bios module and installs it successfully in less than 15 minutes. Notes practical issues: module manifests carry version/metadata, binary assemblies cannot be unloaded from the CLR, and the uploader points out 229 scripts on the repo solving the same password-expiry problem.
AI-written summary · about
chapters (8)
- 0:00Start
- 4:23OVERVIEW
- 4:37THE PROBLEM
- 9:27THE SOLUTION
- 14:51MODULE DESIGN
- 21:45MODULE STORAGE
- 24:56CREATE A MODULE
- 25:55UPDATE MODULE
related talks
46mThese Are the Modules You’re Looking For: Packaging and Publishing PowerShell..
46mFrom Script to Tool: Building Robust, Meaningful Tools with PowerShell
01h 45mWriting Award Winning PowerShell Functions and Script Modules
45mBullet-proofing Patterns & Practices
22mIt's Raining Modules
52mPowerShell Module Design Rules (and When to Bend Them)
49mStop manually publishing your modules. Automate it in 2 minutes!
46mUsing Automation To Elevate Your Code Creation
