April 2024
Beginner to intermediate
336 pages
8h 51m
English
You have much functionality yet to write in the tool you’ve been building, and we’ve been deferring a lot of it to this point. In this chapter, we’ll focus on capturing, dealing with, logging, and otherwise handling errors the tool may encounter.
Note PowerShell.org offers a free e-book, The Big Book of PowerShell Error Handling, which dives into this topic from a more technical reference perspective (https://PowerShell.org/free-resources/). We recommend checking it out once you’ve completed this tutorial-focused chapter.
PowerShell defines two broad types of bad situations: errors and exceptions. Because most PowerShell commands are designed to deal with multiple things ...