From the course: PowerShell 7 Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Define custom help

Define custom help - PowerShell Tutorial

From the course: PowerShell 7 Essential Training

Start my 1-month free trial

Define custom help

- [Instructor] When building PowerShell, one of the core reasons for doing this is so that you could reuse the scripts and share them between either other organizations or other individuals in the team. Now one of the things that would make sense here like normal code is to comment the PowerShell or at least provide some kind of help. So what I'm doing here is just creating a new file called help.ps1. And then what I'm going to do is paste a function in here and we're going to use this as the function for testing the help. So you can see first off it's called add four numbers. It takes four parameters. First, second, third, fourth. Adds those numbers together into a result and then basically writes out the message that will say one, add one, add one, add one, equals the number. So let's first check to make sure this works. Okay. So add four numbers. You'll see first one, second one, third one, fourth one and…

Contents