Chapter 32. Functions that work like cmdlets
This chapter covers
- Defining a problem
- Developing and testing a solution
- Making the solution production-ready
- Adding formatting and type information
We’re not going to introduce any major new concepts or techniques in this chapter. Instead, we’ll use this chapter to bring together many of the things that the previous eight or so chapters covered. We’ll take a task, write a command to perform that task, and then turn that task into a complete script module, complete with error handling, debugging provisions, a custom default view, a type extension, and lots more. This example is intended to be a soup-to-nuts practical illustration of something you might do on your own.
As we walk you through ...
Get PowerShell in Depth, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.