SessionState Class
Collapse the table of content
Expand the table of content

SessionState Class

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)

Dim instance As SessionState

Public NotInheritable Class SessionState
public final class SessionState
public final class SessionState

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.


Target Platforms

© 2015 Microsoft