ParameterAttribute.ValueFromPipeline Property
Gets and sets a Boolean value that indicates whether the parameter can take values from incoming pipeline objects.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in system.management.automation.dll)
Usage

Dim instance As ParameterAttribute
Dim value As Boolean

value = instance.ValueFromPipeline

instance.ValueFromPipeline = value
Syntax

Visual Basic
Public Property ValueFromPipeline As Boolean
C#
public bool ValueFromPipeline { get; set; }
C++
public:
property bool ValueFromPipeline {
    bool get ();
    void set (bool value);
}
J#
/** @property */
public boolean get_ValueFromPipeline ()

/** @property */
public void set_ValueFromPipeline (boolean value)
JScript
public function get ValueFromPipeline () : boolean

public function set ValueFromPipeline (value : boolean)

Property Value

A Boolean value that indicates true if the parameter can take values from the incoming pipeline objects. This setting is used if the cmdlet must access the complete input object. false indicates that the parameter cannot take values from the complete input object. The default is false.
Example

This example shows how the Parameter attribute is used to declare a parameter that accepts input from incoming pipeline objects.

C#
[Parameter(ValueFromPipeline=true)]
public string UserName
{
  get { return userName; }
  set { userName = value; }
}
private string userName;
Remarks

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.


Thread Safety

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

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
See Also

Page view tracker