Parameters, Validation, and Dynamic Parameters

PowerShell has an extensive parameter handling and validation system that can be used in scripts and functions. The system allows a developer to make parameters mandatory; to define what, if any, positional binding is allowed; to fill parameters from the pipeline; to describe different parameter sets; and to validate the values passed to a parameter. The wealth of options available makes parameter handling a very involved subject.

This chapter explores the following topics:

  • The Parameter attribute
  • Validating input
  • Pipeline input
  • Defining parameter sets
  • Argument-completers
  • Dynamic parameters
..................Content has been hidden....................

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