Error handling with PowerShell

This module of the PowerShell course is dedicated to error handling. Read this page to find out more about the content of future chapters.

Over the course of these chapters, you'll learn how errors work in PowerShell, and how to handle them in your scripts. This involves using Try-Catch-Finally instruction blocks to tell our script what to do when an error is encountered.

In addition, you'll learn how to differentiate between fatal and non-fatal errors, and discover the ErrorAction parameter and the ErrorActionPreference preference variable. Theoretical explanations are accompanied by practical examples to help you get to grips with the concepts studied.


This course is available in two other formats: paper book and digital book! This is your chance to support IT-Connect!

book to learn PowerShell