ParameterSetMetadata Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Represents the metadata for a parameter that belongs to a parameter set. A parameter can have different metadata for each parameter set that it belongs to. This class is introduced in Windows PowerShell 2.0.

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

System.Object
  System.Management.Automation.ParameterSetMetadata

public sealed class ParameterSetMetadata

NameDescription
System_CAPS_pubpropertyHelpMessage

Gets and sets the Help message that describes the parameter for this parameter set. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyHelpMessageBaseName

Gets and sets the location of the resource identifiers of the parameter for this parameter set, such as a resource assembly that contains the Help messages used for localization. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyHelpMessageResourceId

Gets and sets the resource identifier of the Help message of the parameter for this parameter set. This identifier is typically used when localizing the message. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyIsMandatory

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

System_CAPS_pubpropertyPosition

Gets and sets the position of the parameter, if it is a positional parameter, for this parameter set.

System_CAPS_pubpropertyValueFromPipeline

Gets and sets a Boolean value that indicates whether the parameter for this parameter set accepts values from incoming pipeline objects.

System_CAPS_pubpropertyValueFromPipelineByPropertyName

Gets and sets a Boolean value that indicates whether the parameter for this parameter set accepts values from a property in the incoming pipeline object that has the same name as the parameter. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyValueFromRemainingArguments

Gets and sets a Boolean value that indicates whether the parameter for this parameter set accepts all the remaining command-line arguments that are associated with this parameter. This property is introduced in Windows PowerShell 2.0.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

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

A parameter is added to one or more parameter sets when the parameter is declared by using the Parameter attribute. This means that parameters can be included in multiple parameter sets. However each parameter set must have at least one parameter that is unique to that parameter set. Good cmdlet design strongly suggests that the unique parameter of a parameter set is a mandatory parameter.

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

For more information about cmdlet parameters, see Cmdlet Parameters.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: