Chapter 17. Troubleshooting Scripts

A well-designed, well-written script rarely needs troubleshooting. This is not to say that all scripts are perfect or that all scripts run without errors the first time they are executed—or even the second time. Yet, a good script should be organized in a manner that makes it easy to read and easy to understand. By default, the two best practices of readability and understandability reduce the amount of troubleshooting necessary to fix errors in a script because they make errors easier to spot. When problems do crop up, however, you will want to know how to debug your script. In this chapter, we will look at the commands to produce ...

Get Windows PowerShell™ 2.0 Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.