Complete the code to make the parameter mandatory.
param(
[[1](Mandatory=$true)]
[string]$Name
)The Parameter attribute with Mandatory=$true makes a parameter required when running the script or function.
Complete the code to restrict the parameter to specific values.
param(
[ValidateSet([1])]
[string]$Color
)The ValidateSet attribute restricts the parameter to the specified values. Here, only 'Red', 'Green', or 'Blue' are allowed.
Fix the error in the parameter attribute to make the parameter mandatory with a ValidateSet.
param(
[[1](Mandatory=$true)]
[ValidateSet('Small', 'Medium', 'Large')]
[string]$Size
)The Parameter attribute is used to set properties like Mandatory=$true. It must be combined with ValidateSet separately.
Fill both blanks to create a mandatory parameter that only accepts 'Yes' or 'No'.
param(
[[1](Mandatory=$true)]
[[2]('Yes', 'No')]
[string]$Confirm
)Use Parameter with Mandatory=$true to require the parameter, and ValidateSet to restrict values to 'Yes' or 'No'.
Fill all three blanks to define a mandatory parameter named 'Mode' that accepts only 'Auto', 'Manual', or 'Off'.
param(
[[1](Mandatory=[2])]
[[3]('Auto', 'Manual', 'Off')]
[string]$Mode
)The Parameter attribute with Mandatory=$true makes the parameter required. The ValidateSet attribute restricts the allowed values.