Summary
In this chapter, we’ve moved on from learning the building blocks of PowerShell syntax, and now we’re beginning to put things together. The techniques we’ve learned may not be familiar to us, but with time and practice, they will become familiar and easy. As we go through the rest of the book, we will have plenty of opportunities to use them.
We started by talking about what scripts are and why we might want to write scripts at all. We looked briefly at where we can find other people’s scripts, and what we need to do to run them on our machines.
We’ve done a lot of practical work in this chapter. Firstly, we looked at how we might make it easier for people to read what we’re doing by breaking long pipelines up and substituting variables for hardcoded values in cmdlets, particularly values that might change.
We moved on to look at how we could pass those values into the script from outside using parameters, and we looked at...