Param, parameters, and CmdletBinding

The param block must appear before all other code with the exception of attributes. In a script, using statements, if present, must also be written before param.

The param block is used to define the parameters a Script or Function is willing to accept. The keyword is not case-sensitive, so the opening bracket may be placed immediately after (with no space), on the next line, or as shown in this simple example:

param (
$Parameter1,
$Parameter2
)

By default, parameters have the System.Object type. This means that you can pass just about anything into a parameter. It may be desirable to restrict values to those of a specific type.

..................Content has been hidden....................

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