Share via


PSVariableIntrinsics.Get(String) Method

Definition

Gets the specified variable from session state.

public:
 System::Management::Automation::PSVariable ^ Get(System::String ^ name);
public System.Management.Automation.PSVariable Get (string name);
member this.Get : string -> System.Management.Automation.PSVariable
Public Function Get (name As String) As PSVariable

Parameters

name
String

The name of the variable to get. The name can contain drive and/or scope specifiers like "ENV:path" or "global:myvar".

Returns

The specified variable.

Exceptions

If name is null.

Applies to