11

Creating Our First Module

Most programming languages include the concept of a library – an object that contains code, documentation, programming objects such as classes, message templates, and a host of other things. These libraries extend what we can do with that language by helping us to use other people’s code and reuse our own. In this chapter, we’re going to explore PowerShell modules – a convenient way of distributing PowerShell code.

We’ll start by briefly recapping how to work with modules and the cmdlets we use to do that. Then, we’ll look at the components of a module. We’ll learn how to write a module manually, before wrapping up with a brief look at using a module scaffolding application called Plaster.

The main topics we will ...

Get PowerShell 7 Workshop 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.