concept basic function in category powershell

appears as: basic function, Basic functions
Learn PowerShell Scripting in a Month of Lunches

This is an excerpt from Manning's book Learn PowerShell Scripting in a Month of Lunches.

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 unit of work for toolmaking, as long as you follow the basic principle of keeping your function tightly scoped and self-contained. We’ve written already about the need to have tightly scoped functions—that is, functions that do just one thing. Self-contained means the function needs to live in its own little world and become a kind of black box. Practically speaking, that means two things: