PSVariable PSVariable PSVariable Class

Definition

Represents a variable in the PowerShell language.

public class PSVariable
type PSVariable = class
    interface IHasSessionStateEntryVisibility
Public Class PSVariable
Inheritance
PSVariablePSVariablePSVariable

Constructors

PSVariable(String) PSVariable(String) PSVariable(String)

Constructs a variable with the given name.

PSVariable(String, Object) PSVariable(String, Object) PSVariable(String, Object)

Constructs a variable with the given name, and value.

PSVariable(String, Object, ScopedItemOptions) PSVariable(String, Object, ScopedItemOptions) PSVariable(String, Object, ScopedItemOptions)

Constructs a variable with the given name, value, and options.

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

Constructs a variable with the given name, value, options, and attributes

Properties

Attributes Attributes Attributes

Gets the collection that contains the attributes for the variable.

Description Description Description

Gets or sets the description of the variable.

Module Module Module

The module where this variable was defined.

ModuleName ModuleName ModuleName

The name of the module that defined this variable.

Name Name Name

Gets the name of the variable.

Options Options Options

Gets or sets the scope options on the variable.

Value Value Value

Gets or sets the value of the variable

Visibility Visibility Visibility

If true, then this variable is visible outside the runspace.

Methods

IsValidValue(Object) IsValidValue(Object) IsValidValue(Object)

Checks if the given value meets the validation attribute constraints on the PSVariable.

Applies to