Chapter 2. Foundations of PowerShell
This chapter covers:
“Begin at the beginning,” the king said “and then go on till you come to the end, then stop.”
Lewis Carroll, Alice in Wonderland
Vizzini: Inconceivable!
Inigo: You keep on using that word. I do not think it means what you think it means.
William Goldman, The Princess Bride
This chapter introduces the foundational concepts underlying the PowerShell language and its environment. We’ll cover language details that are specific to PowerShell and look at how the interpreter parses the commands we type. This chapter also covers the various types of commands you’ll encounter along with the anatomy and operation of the pipeline itself. We’ll look at the basic syntax for expressions and commands, including how to add comments to scripts and how arguments and parameters are handled. Finally, we’ll close the chapter with a discussion of how the formatting and output subsystem works in PowerShell.