Summary

This chapter explored the different ways to raise and handle errors in PowerShell. Then, we looked at the difference between terminating and non-terminating errors.

We discussed using try-catch-finally, introduced with PowerShell 2, as the preferred means of handling terminating errors.

Then we demonstrated the use of trap, the type of error handling available with PowerShell 1, which we can add to our error-handling toolset.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.189.5