PowerShell has the purpose of solving problems, and the smallest
tool it comes equipped with for this is commands. By now you should be
able to appreciate the great diversity of the PowerShell command
repertoire: in the first two chapters, you already learned how to use
the built-in PowerShell commands called cmdlets, as well as innumerable
external commands, such as ping or ipconfig. In Chapter 6,
the objects of the .NET framework, API calls, and COM component
statements were added, providing you with a powerful arsenal of
commands.
In Chapters 3-5,
command chains forged out of these countless single commands combined
statements either by using variables or the PowerShell pipeline.
The next highest level of automation is functions, which are
self-defined commands that internally use all of the PowerShell
mechanisms you already know, including the loops and conditions covered
in the last two chapters. You can also use functions to get the better
of the more complex problems that consist of many separate instructions
and sequences.