PowerShell Troubleshooting Guide

More Information
  • Utilize PowerShell output cmdlets to provide the troubleshooting information you need
  • Use pipeline input in your functions to reduce parameter passing issues
  • Use Write-* cmdlets to expose the right kind of information in the right places
  • Control the environment to eliminate surprises when executing scripts
  • Create powerful scripts and functions that communicate expectations
  • Write unit tests for your PowerShell functions and scripts to ensure that they can be executed correctly

Windows PowerShell provides an amazing platform for administrative scripting and automation. Understanding the PowerShell language will enable you to spend less time troubleshooting and be more effective when debugging is required. PowerShell also includes several avenues to provide feedback from your code that will make your troubleshooting and debugging time more profitable.

Improved coding practices combined with useful diagnostic information can lead to results quickly. This book starts with background information on the purposes of automation and PowerShell's entrance into Microsoft's automation strategy, and also answers the question of whether scripting (and specifically PowerShell scripting) is essentially different than traditional programming. A brief overview of the main features of the PowerShell language along with examples is provided. Focus is placed on proper script design and use of PowerShell features in an attempt to reduce the need for troubleshooting.

  • Reduce troubleshooting surprises by understanding the PowerShell language
  • Avoid parameter passing mistakes by using PowerShell’s unique pipeline binding capabilities
  • Answer questions such as what, how, and why in troubleshooting sessions by utilizing PowerShell’s various write- cmdlets
Page Count 206
Course Length 6 hours 10 minutes
ISBN 9781782173571
Date Of Publication 28 Nov 2014


Michael Shepard

Michael Shepard has been working with computers since the early '80s, starting with an Apple II in school and a Commodore 64 at home. He started working in the IT industry in 1989 and has been working full-time since 1997. He has been working at Jack Henry & Associates, Inc. since 2000. His focus has changed over the years from being a database application developer to a DBA, an application admin, and is now a solutions architect. In his years as a DBA, he found PowerShell to be a critical component in creating the automation required to keep up with a growing set of servers and applications. He is active in the PowerShell community at Stack Overflow and projects at CodePlex. He has been blogging about PowerShell since 2009 at http://powershellstation.com.