Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SessionStateProxy.GetVariable Method (String)

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Retrieves a variable from the session state.

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

public virtual object GetVariable(
	string name
)

Parameters

name
Type: System.String

The name of the variable to retrieve.

Return Value

Type: System.Object

An object containing the retrieved variable.

Exception Condition
ArgumentNullException

The name parameter is null.

InvalidRunspaceStateException

The runspace is not open.

InvalidOperationException

Another SessionStateProxy call or another pipeline is in progress.

Return to top

Community Additions

Show: