Parallel Execution with PowerShell
summary
Shows concrete ways to cut an 8‑hour script toward 30 minutes: use remoting (Invoke‑Command fan‑out, Invoke-Command (fan-out) scales to ~5k targets), avoid spawning many PowerShell.exe processes, prefer jobs for ad hoc background work but use runspaces for efficiency, and prefer runspace pooling with MaxThreads controls concurrency to get predictable throughput while watching CPU/memory. Notes pitfalls: double‑hop/CredSSP, runspace “dirty” state, IPC limits. Describes a working proof‑of‑concept: file‑system / Zookeeper queue service prototype that ran scripts asynchronously.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:45Interview Question
- 1:24Concurrency
- 3:25Multiple Computers
- 5:54Demo
- 8:22Scheduled Tasks
- 10:55Single Computer
- 13:25Serial Operation
- 14:56Jobs
- 15:44Patrol
- 16:27Job Status
- 17:05Job Script
- 20:36Run Spaces
- 21:41Garbage Collection
- 22:23Run Space
- 23:37Multiple Run Space
- 25:25New Script
- 26:06Run Space pooling
- 27:17Run Space Balloon
- 30:25Sleep
- 34:37Synchronization
- 36:24Service Queue
related talks
34mWhip Your Scripts into Shape: Optimizing PowerShell for Speed
51mPowerShell Techniques and Performance Tweaks - Full Throttle
46mSupercharging PowerShell with LINQ
01h 47mBuilding PowerShell Applications that Operate on a Planetary Scale
44mWriting Clustered Applications with Windows PowerShell and...
43mPowerShell Remoting Internals
41mManaging a Hybrid Infrastructure with PowerShell
01h 07mPowerShell: Designed for a Messy World
