Chapter 5. Proactive PowerShell
PowerShell includes capabilities to improve the quality of scripts that will prevent some of the problems that might be encountered in the scripting process. In this chapter, we'll cover the following topics:
- Error handling (
try
/catch
versustrap
) - Parameterization and pipeline input
- Pipelines and function execution
- Parameter validation
- Parameter type transformation
- Strictmode/PSDebug
- #REQUIRES statements (version or administrator)
- CmdletBinding and common parameters