SessionState SessionState SessionState Class

Definition

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

public sealed class SessionState
type SessionState = class
Public NotInheritable Class SessionState
Inheritance
SessionStateSessionStateSessionState

Constructors

SessionState() SessionState() SessionState()

Construct a new session state object...

Properties

Applications Applications Applications

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

Drive Drive Drive

Gets the APIs to access drives

InvokeCommand InvokeCommand InvokeCommand

The command invocation intrinsics for this session state instance.

InvokeProvider InvokeProvider InvokeProvider

The provider intrinsics for this session state instance.

LanguageMode LanguageMode LanguageMode

Get/set constraints for this execution environment

Module Module Module

The module associated with this session state instance...

Path Path Path

Gets the APIs to access paths and location

Provider Provider Provider

Gets the APIs to access providers

PSVariable PSVariable PSVariable

Gets the APIs to access variables in session state.

Scripts Scripts 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 UseFullLanguageModeInDebugger UseFullLanguageModeInDebugger

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

Methods

IsVisible(CommandOrigin, CommandInfo) IsVisible(CommandOrigin, CommandInfo) IsVisible(CommandOrigin, CommandInfo)

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

IsVisible(CommandOrigin, PSVariable) IsVisible(CommandOrigin, PSVariable) IsVisible(CommandOrigin, PSVariable)

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

IsVisible(CommandOrigin, Object) IsVisible(CommandOrigin, Object) IsVisible(CommandOrigin, Object)

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

ThrowIfNotVisible(CommandOrigin, Object) ThrowIfNotVisible(CommandOrigin, Object) ThrowIfNotVisible(CommandOrigin, Object)

Utility to check the visibility 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...

Applies to