SessionState Class

Definition

Exposes the APIs to manipulate the providers, Runspace data, and location to the Cmdlet base class.

public sealed class SessionState
Inheritance
SessionState

Constructors

SessionState()

Construct a new session state object...

Properties

Applications

Public proxy for the list of appications that are allowed to be run. If the name "*" is in the list, then all applications can be run. (This is the default.)

Drive

Gets the APIs to access drives

InvokeCommand

The command invocation intrinsics for this session state instance.

InvokeProvider

The provider intrinsics for this session state instance.

LanguageMode

Get/set constraints for this execution environemnt

Module

The module associated with this session state instance...

Path

Gets the APIs to access paths and location

Provider

Gets the APIs to access providers

PSVariable

Gets the APIs to access variables in session state.

Scripts

Public proxy for the list of scripts that are allowed to be run. If the name "*" is in the list, then all scripts can be run. (This is the default.)

UseFullLanguageModeInDebugger

If true the PowerShell debugger will use FullLanguage mode, otherwise it will use the current language mode

Methods

IsVisible(CommandOrigin, CommandInfo)

Checks the visibility of an object based on the command origin argument.

IsVisible(CommandOrigin, PSVariable)

Checks the visibility of an object based on the command origin argument.

IsVisible(CommandOrigin, Object)

Checks the visibility of an object based on the command origin argument.

ThrowIfNotVisible(CommandOrigin, Object)

Utility to check the visiblity of an object based on the current command origin. If the object implements IHasSessionStateEntryVisibility then the check will be made. If the check fails, then an exception will be thrown...