Pimp Your Parameters: The Magic of Transformation...
summary
Live demos show how PowerShell argument transformation attributes actually convert inputs: built-in PSCredential behavior, a custom secure-string transformation attribute that turns plaintext into SecureString, a service transformation attribute that accepts names or ServiceController objects, array-aware process conversion, JSON-to-string validation (file or object), and path-expansion for CLIs. Order of type then attribute then variable matters. Code examples compile and run during the session; most transformations succeed, with explicit error handling for invalid inputs.
AI-written summary · about
chapters (14)
- 0:00Welcome
- 1:15Built-in type conversion
- 3:25Transformation attributes overview
- 5:55PS credential transformation
- 7:21Custom transformation classes
- 9:58Secure string demo
- 11:26Transformation attributes outside functions
- 12:52Pipeline transformations
- 14:43Service transformation implementation
- 16:10Array transformations
- 18:03JSON transformation
- 20:14Path expansion transformation
- 21:41Combining transformations
- 23:06Questions and closing remarks
related talks
28mPimp Your Parameters: The Magic of Validation Classes
51mInfrastructure as Real Code - An Intro to Pulumi
17mRespect The Process
35mTypeScript Gymnastics: Why Are They So Powerful for You?
25mPower in constraints
37mInput Validation in PureScript: Simpler, Safer, and Stronger (Part 2)
43mInput Validation in PureScript: Simpler, Safer, and Stronger (Part 1)
01h 01mCan TypeScript really make infrastructure management easy?
