Chapter 13. Script and manifest modules

We’ve been building Get-SystemInfo for several chapters now, and we’ve been testing it by inserting a line, at the end of our script, that runs the function. It’s time to move away from that and into something that’s a bit more formal, packaged distributable for our command. We also need to find a way to get our custom view XML file to load into memory automatically when someone wants to use our tool. In this chapter, we’ll accomplish both.

13.1. Introducing modules

Introduced in PowerShell v2, modules are the shell’s preferred means of extension (over the original PSSnapin extension technology). Modules can, in many cases, be file copied rather than requiring packagers or installers, which makes modules ...

Get Learn PowerShell Toolmaking in a Month of Lunches 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.