Table of Contents

Parameters

To receive input for execution, use Powershell parameters (param).

Parameters must be added at the very top of the script.

Example

param (
 [Parameter (MANDATORY = $TRUE)][string] $parameter1,
 [Parameter(MANDATORY = $FALSE)][string] $parameter2
)

You will find more about the subject in PowerShell Documentation here.


Videos