Export (0) Print
Expand All

SessionStateVariableEntry Constructor (String, Object, String, ScopedItemOptions, Attribute)

Creates a new SessionStateVariableEntry object that contains the name, value, description, usage options, and a single metadata attribute of the variable. This constructor is introduced by Windows PowerShell 2.0.

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

Dim name As String
Dim value As Object
Dim description As String
Dim options As ScopedItemOptions
Dim attribute As Attribute

Dim instance As New SessionStateVariableEntry(name, value, description, options, attribute)

public SessionStateVariableEntry (
	string name,
	Object value,
	string description,
	ScopedItemOptions options,
	Attribute attribute
public SessionStateVariableEntry (
	String name, 
	Object value, 
	String description, 
	ScopedItemOptions options, 
	Attribute attribute
public function SessionStateVariableEntry (
	name : String, 
	value : Object, 
	description : String, 
	options : ScopedItemOptions, 
	attribute : Attribute



The name of the variable.


The value assigned to the variable when the runspace is opened.


A description of the variable,


A ScopedItemOptions constant that defines how the variable can be used, such as whether the variable is read-only or a constant.


A single attribute that defines metadata for the variable.

A variable entry is added to the initial session state through the InitialSessionStateEntryCollection object associated with the InitialSessionState.Variables property.


Target Platforms

© 2015 Microsoft