February 2024
Beginner to intermediate
468 pages
11h 10m
English
There are, broadly, two types of problems that we encounter when using PowerShell: problems that our code encounters and problems with our code. The first type may be as simple as a FileNotFound message in response to Get-ChildItem. The second type can be much harder to understand, as it may involve problems related to scope, which we saw in Chapter 9, Don’t Repeat Yourself – Functions and Scriptblocks, or an unexpected divide by zero error. We’ll deal with problems that our code encounters in the first half of this chapter, and then move on to problems we may find in our code in the second half.
We’ll start by defining what an error is and look at the two types of errors our code will encounter: terminating ...
Read now
Unlock full access