Book Image

PowerShell Troubleshooting Guide

By : Mike Shepard
Book Image

PowerShell Troubleshooting Guide

By: Mike Shepard

Overview of this book

Table of Contents (15 chapters)
PowerShell Troubleshooting Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, we looked at several aspects of the PowerShell language that are implemented in ways different from other popular programming languages such as C#, Java, and VB.NET. On the topic of strings, types of quotes, string substitution, and escaping special characters were covered. The discussion of PowerShell functions focused on the types and number of objects returned and how functions in PowerShell write objects to an output stream throughout the execution of the function rather than returning all of the values at the end of execution. The final topic focused on error handling methods in PowerShell, including the trap statement from PowerShell Version 1.0, the more advanced try, catch, and finally statements included from Version 2.0, and the difference between terminating errors and non-terminating errors.

The focus of the next chapter will be on practices that will help keep PowerShell code performing well and easy to debug.