The Zen of Powershell - PowerShell for the C# dev
summary
A practical guide for C# developers showing concrete PowerShell behaviours and fixes: parameter parsing treats commas create arrays while flags use spaces, .NET method invokes want bracketed argument arrays, and return writes to pipeline so assign or pipe to capture values; distinguish Write-Host vs Write-Output, use Verbose/Debug preferences or CmdletBinding for switches, and watch variable scope requiring script: scope needed for cross-function assignments. Demonstrates Pester tests with mocks, the TestDrive filesystem, code coverage, custom Format XML and a C# PSModule/PSCmdlet integration; demos run after stepwise fixes.
AI-written summary · about
chapters (5)
- 0:00Start
- 9:10write some output out to the outside world
- 21:49run all the tests
- 26:04invoke casper from the command line
- 34:50passing in an array of ingredients
related talks
48mMastering PowerShell Parameters: Advanced Techniques and Best Practices
26mPowerShell Oddities & Curiosities: Language Quirks You Forgot (or Never Knew)
39mLinux Shell Debates or: How I Stopped Worrying and Learned to Love PowerShell
01h 06mA Historical Architectural Tour of PowerShell
51mPowerShell Techniques and Performance Tweaks - Full Throttle
01h 28mWriting Compiled PowerShell Cmdlets
31mHow to Satisfy Your OCD with PowerShell Code and Tools
43mPowerShell For Every System
