PSVariable Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Represents a variable used in the Windows PowerShell language.

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

System.Object
  System.Management.Automation.PSVariable

public class PSVariable

NameDescription
System_CAPS_pubmethodPSVariable(String)

Initializes a new instance of the PSVariable class that contains the name of the variable.

System_CAPS_pubmethodPSVariable(String, Object)

Initializes a new instance of the PSVariable class that contains the name and value of the variable.

System_CAPS_pubmethodPSVariable(String, Object, ScopedItemOptions)

Initializes a new instance of the PSVariable class that contains the variable name, value, and scope options.

System_CAPS_pubmethodPSVariable(String, Object, ScopedItemOptions, Collection<Attribute>)

Initializes a new instance of the PSVariable class that contains the variable name, value, options, and attributes.

NameDescription
System_CAPS_pubpropertyAttributes

Gets the attributes of the variable.

System_CAPS_pubpropertyDescription

Gets or sets the description of the variable.

System_CAPS_pubpropertyModule

Gets information about the module that exported this variable. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyModuleName

Gets the name of the module that exported this variable. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyName

Gets the name of the variable.

System_CAPS_pubpropertyOptions

Gets or sets the scope options of the variable.

System_CAPS_pubpropertyValue

Gets or sets the value of the variable.

System_CAPS_pubpropertyVisibility

Gets or sets whether the variable is public (visible outside the runspace where the variable is set) or private. This property is introduced in Windows PowerShell 2.0.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsValidValue(Object)

Verifies that the specified value of the variable is valid with respect to constraints that are specified by the Attributes property.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

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: