Gets and sets the position of the parameter in the command-line string.
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in system.management.automation.dll)
Dim instance As ParameterAttribute
Dim value As Integer
value = instance.Position
instance.Position = value
Public Property Position As Integer
public int Position { get; set; }
public:
property int Position {
int get ();
void set (int value);
}
/** @property */
public int get_Position ()
/** @property */
public void set_Position (int value)
public function get Position () : int
public function set Position (value : int)
Property Value
The position of the parameter. When you set this property, the property identifies the parameter as a positional parameter.
This example shows how the Parameter attribute is used to declare a positional parameter.
[Parameter(Position = 0)]
public string UserName
{
get { return userName; }
set { userName = value; }
}
private string userName;
This property is an optional Named parameter of the Parameter attribute. For more information about the declaration syntax that is used to specify the Parameter attribute for cmdlets, see >ParameterAttribute Declaration.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Development Platforms
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, Windows 7, Windows 2008 R2 Target Platforms
Windows Server 2008, Windows Server 2003, Windows Vista, Windows XP, Windows 7, Windows 2008 R2