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.

SessionState Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Provides access to data that describes the current operating environment of a Windows PowerShell runspace or module. The properties of this class retrieve objects that can then be used to either monitor or modify the session state data.

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

System.Object
  System.Management.Automation.SessionState

Public NotInheritable Class SessionState

NameDescription
System_CAPS_pubmethodSessionState()

Initializes a new instance of the SessionState class.

NameDescription
System_CAPS_pubpropertyApplications

Gets a list of the applications that are available to the module or runspace that uses this session state. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyDrive

Gets the drive information for the providers that are available to the module or runspace that is using this session state.

System_CAPS_pubpropertyInvokeCommand

Gets methods that can be used to invoke the commands available in the session state. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyInvokeProvider

Gets access to the providers available in the session state. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyLanguageMode

Gets the Windows PowerShell language elements that are available to external requests to this session state. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyModule

Gets information about the module that is using this session state. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyPath

Gets the path information for the providers that are available to the module or runspace that is using this session state.

System_CAPS_pubpropertyProvider

Gets information about the providers that are available to the module or runspace that uses this session state.

System_CAPS_pubpropertyPSVariable

Gets information about the variables that are available to the module or runspace that uses this session state.

System_CAPS_pubpropertyScripts

Gets the scripts that are available to the module or runspace that uses this session state. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyUseFullLanguageModeInDebugger

Gets a value that indicates whether the Windows PowerShell debugger uses FullLanguage mode when debugging scripts in the session. This property is introduced in Windows PowerShell 2.0.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticIsVisible(CommandOrigin, CommandInfo)

Determines whether the specified command should be made visible based on where the command was called and whether the command is private or public. This method is introduced in Windows PowerShell 2.0.

System_CAPS_pubmethodSystem_CAPS_staticIsVisible(CommandOrigin, Object)

Determines whether the specified object should be made visible based on where the object was called and whether the object is private or public. This method is introduced in Windows PowerShell 2.0.

System_CAPS_pubmethodSystem_CAPS_staticIsVisible(CommandOrigin, PSVariable)

Determines whether the specified variable should be made visible based on where the variable was called and whether the variable is private or public. This method is introduced in Windows PowerShell 2.0.

System_CAPS_pubmethodSystem_CAPS_staticThrowIfNotVisible(CommandOrigin, Object)

Checks the visibility of an object based on where the command was called. If the check fails, an exception is thrown. This method is introduced in Windows PowerShell 2.0.

System_CAPS_pubmethodToString()

(Inherited from Object.)

A session state can describe the global session state of a runspace, or it can describe the session state of a module that has been added to a runspace. In both cases, the session state data is public data that is stored in the current instance of the Windows PowerShell engine.

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: