Chapter 7. PowerShell functions
This chapter covers:
Porcupine quills. We’ve always done it with porcupine quills.
Dilbert
In this chapter, we’ll begin looking at how to combine the features from the previous chapters into reusable commands. As you’ll recall from chapter 2, there are four types of PowerShell commands: functions, cmdlets, scripts, and external commands. Functions and scripts are the two command types that can be written in the PowerShell language. We’ll start with functions as they’re the simpler of the two and are also easy to enter interactively in a session. In the next chapter we’ll expand our discussion to include scripts as well as introduce advanced programming features available to both functions and scripts.