Skip to Main Content
Learn PowerShell Scripting in a Month of Lunches
book

Learn PowerShell Scripting in a Month of Lunches

by Jeffery Hicks, Don Jones
December 2017
Beginner content levelBeginner
352 pages
10h 31m
English
Manning Publications
Content preview from Learn PowerShell Scripting in a Month of Lunches

Chapter 15. Dealing with errors

You have a lot of 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 how to capture, deal with, log, and otherwise handle errors the tool may encounter.

Note

PowerShell.org offers a free eBook, The Big Book of PowerShell Error Handling, which dives into this topic from a more technical reference perspective (https://powershell.org/ebooks). We recommend checking it out, once you’ve completed this tutorial-focused chapter.

15.1. Understanding errors and exceptions

PowerShell defines two broad types of bad situation: an error and an exception. Because most PowerShell commands are designed to deal with ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Windows PowerShell in a Month of Lunches, Third Edition

Learn Windows PowerShell in a Month of Lunches, Third Edition

Don Jones

Publisher Resources

ISBN: 9781617295096Publisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link