IsMandatory Property

ParameterSetMetadata.IsMandatory Property


Updated: April 27, 2016

Applies To: Windows PowerShell

Gets and sets a Boolean value that indicates whether the parameter is mandatory for this parameter set.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

public bool IsMandatory { get; set; }

Property Value

Type: System.Boolean

A Boolean value that indicates true if the parameter is mandatory for this parameter set; otherwise false is returned.

The information provided by this class is accessed through the ParameterMetadata.ParameterSets property.

For more information about declaring parameters, see Parameter Attribute Declaration.

For more information about cmdlet parameters, see Cmdlet Parameters.

Return to top

Community Additions

© 2016 Microsoft