10 Building a basic function and script module

Remember the tool we made back in chapter 8? Well, go ahead and fire up Visual Studio Code (VS Code) and open that .ps1 file. In this chapter, we’ll take the tool you designed in chapter 8 and turn that into a reusable tool for others to use. It’s important to understand that this chapter isn’t going to attempt to have you build the entire tool or solve the entire business statement from chapter 8. We’ll take things one step at a time because it’s the process of toolmaking that we want to demonstrate for you.

10.1 Starting with a basic function

Basic functions have been a part of PowerShell since day one, and they’re one of the many types of commands that PowerShell understands (some of the others ...

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