Chapter 10. Building a basic function and script module

In this chapter, you’ll start creating the tool that you designed in chapter 8, using some of the commands that you figured out and tested in the previous chapter. 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 existed in PowerShell since v1, and they’re one of the many types of commands that PowerShell understands (some of the others being cmdlets, applications, workflows, and so on). Functions make a great ...

Get Learn PowerShell Scripting 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.