February 2024
Beginner to intermediate
468 pages
11h 10m
English
So far, everything we have done has been one thing after another, to paraphrase Arnold Toynbee. That’s fine, but it doesn’t reflect how we want things to happen in the real world. Most of the time, we want our code to do different things depending on the circumstances, and sometimes we want it to do something a number of times. This is where control flow is necessary. In this chapter, we are going to look at how to make PowerShell do different things in a script, depending on what it finds – these are called conditionals. Then we are going to look at how to make PowerShell repeat a process, both for a predetermined number of times and for an indefinite number. Because an indefinite number may ...
Read now
Unlock full access