Script Blocks Decoded
summary
Defines script blocks as anonymous functions and shows how they run via Invoke and the call operator, used in jobs and remoting with the using keyword and positional argument lists; demonstrates parameter validation limits (no parameter sets), builds dynamic modules in memory, creates a closure-based counter that preserves state, and assembles a proxy Out-Default that auto-cds or opens URLs. Demos include splitting by pairs, separable pipelines, and why module exports are closures.
AI-written summary · about
chapters (23)
- 0:00Introduction
- 6:11Windows PowerShell in Action
- 6:34What are Script Blocks
- 7:20Using Script Blocks
- 9:10Function Providers
- 10:35Script Blocks
- 12:36Advanced Functions
- 13:08Parabola
- 13:35Parameters
- 14:54Script Blocks Documentation
- 15:42Scope
- 17:32Jobs
- 18:06White Job
- 18:36Kick Job
- 19:24Showoff Method
- 20:29Remoting
- 21:01Scope Parameter
- 22:04Bill and Ben
- 23:34Modular arithmetic
- 27:26Closures
- 31:12Functions
- 34:30Getting Process
- 36:31Proxy Functions
related talks
56mAdvanced Scripting Using SSIS Script Tasks and Components
22mScript Kit: The Ultimate Open Source Dev Kit
48mUnexplained phenomena: powerful tricks you likely didn't know were even possible
35mImproving Your Attributes
01h 29mPerformance and Technique Tweaks: The Encore
47mTempting Fate: Patterns & practices for shareable scripts and functions
25mCommandLine Tools for DevOps
45mBullet-proofing Patterns & Practices
